How to get the currently read XmlNode object?
How to get the currently read XmlNode object?
(OP)
Colleagues,
As usual, I couldn't find the answer to the question in subject in the MS Documentation (they associate the XmlNode objects with XmlDocument, not with XmlReader).
When I have the XmlReader read the next node, how do I get the node itself?
Here's the code I have now:
TIA!
As usual, I couldn't find the answer to the question in subject in the MS Documentation (they associate the XmlNode objects with XmlDocument, not with XmlReader).
When I have the XmlReader read the next node, how do I get the node itself?
Here's the code I have now:
CODE --> .NET
Do While loXMLReader.Read() lsXMLNodeContents = lsEndTag = "" 'What code should be here (provided I have declared loXMLNode As XmlNode before the Do While cycle)? If XmlNode.HasChildNodes Then lsBuffer = lsBuffer & "Node " & Chr(34) & loXMLReader.Name & Chr(34) & " has children, written As-Is" & vbCrLf lcHdrStr = lcHdrStr & "<" & loXMLReader.Name & ">" & vbCrLf & IIf(tlFormat, vbCrLf, "") loStreamWriter.Write(lcHdrStr) Continue Do End IfLoop 'While loXMLReader.Read()'some other codes, that sorts amd modifies the contents of a node just read
TIA!
Regards,
Ilya