Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"The data at the root level is invalid" error on reading XML

Status
Not open for further replies.

ozane

Technical User
Feb 3, 2005
57
TR
i am trying to read an xml from binary field in SQL server. i read the blob correctly. but when i want to see file as xml "the data at the root level is invalid. line 1..." error appears.
i searched the web. i met that, the reason is: the xml is not an xml, it is text.
correct i have statement in my code
MyStrData = System.Text.UTF8Encoding.UTF8.GetString(MyData)

then i want to convert the binary to XML. but how can i do that? any idea...
 
>> but when i want to see file as xml

when it comes from SQL server itself?

there is a FOR XML AUTO clause in SQL server, check it out...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top