I have a dataset with one row and one column. into that cell a have saved an xml ( created in sql server and convertet into a strinf)
How can I in vb. convert that string into an xml?
You can use different approaches offered by .NET FCL. Here is my short overview of them:
-
Use
System.Xml.XmlDocument
class. It implements DOM interface; this way is the easiest and good enough if the size if the document is not too big.
See
http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx
[
^
].
-
Use the class
System.Xml.XmlTextReader
; this is the fastest way of reading, especially is you need to skip some data.
See
http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.aspx
[
^
].
-
Use the class
System.Xml.Linq.XDocument
; this is the most adequate way similar to that of
XmlDocument
, supporting LINQ to XML Programming.
See
http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx
[
^
],
http://msdn.microsoft.com/en-us/library/bb387063.aspx
[
^
].
Besides, not in all cases you have to work with XML directly. In many cases, you can use
serialization
http://en.wikipedia.org/wiki/Serialization
[
^
],
https://msdn.microsoft.com/en-us/library/7ay27kt9%28v=vs.110%29.aspx
[
^
].
In particular, you could use
DataContract
:
https://msdn.microsoft.com/en-us/library/ms733127%28v=vs.110%29.aspx
[
^
].
Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad
spelling and grammar.
If a question is poorly phrased then either ask for clarification, ignore it, or
edit the question
and fix the problem. Insults are not welcome.
Don't tell someone to read the manual. Chances are they have and don't get it.
Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.