How to read only Nodes in schema ?
-
I have the code of readin gxml file Dim reader As New Xml.XmlTextReader("C:\XMLFile2.xml") Dim s As String = "" While reader.Read() s = s + reader.Name End While Now from above code,the reader reads every single word of the schema.. But I want to read only Nodes and its child node of the schema and store it into s.. How can I read only the element and its child nodes ?
-
I have the code of readin gxml file Dim reader As New Xml.XmlTextReader("C:\XMLFile2.xml") Dim s As String = "" While reader.Read() s = s + reader.Name End While Now from above code,the reader reads every single word of the schema.. But I want to read only Nodes and its child node of the schema and store it into s.. How can I read only the element and its child nodes ?
Use the ReadElementXXX methods rather than Read(). Better yet, use and XMLDocument or XDoxument in 3.5.
only two letters away from being an asset