Video: Edit XML Data with the XmlDocument Class
In this video tutorial I walk through how to use the XmlDocument class to edit XML data. Click the link below to view the video.
In this video tutorial I walk through how to use the XmlDocument class to edit XML data. Click the link below to view the video.
Reader Comments (1)
while implementing my project i created as storedprocedure as follows in sqlserver 2000
create proc xml(@xml as varchar(8000),
@hdoc int)
as begin
exec sp_xml_preparedocument @hdoc output,@xml
insert into catalog(TITLE,ARTIST,COUNTRY,COMPANY,PRICE,YEAR)select * from openxml(@hdoc,'CATALOG/CD',2)with(T varchar(50),ARTIST varchar(50),COUNTRY varchar(50),COMPANY varchar(50),PRICE float,YEAR varchar(20))
end
and i call this procedure as follows in asp.net2.0
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cmd As New SqlCommand("xml", con)
con.Open()
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@hdoc", SqlDbType.Int)
cmd.Parameters.AddWithValue("@xml", TextBox1.Text)
cmd.ExecuteNonQuery()
con.Close()
End Sub
here textbox1.text=path of the xml document
but i got the following runtime error
XML parsing error: Invalid at the top level of the document.
that is how to eliminate +,- signs from xmldocument which i want to insert into my sqlserver table
so plz consider my request,it is very urgent
thanks,
with regards,
Narasareddy.M