Hello,
How to get the null value from the xml node.
Pls. modify the following code to get null value.
How to get the null value from the xml node.
Pls. modify the following code to get null value.
VB.NET:
Imports System.Xml
Module Module1
Sub Main()
Dim reader As XmlTextReader = New XmlTextReader("bb.xml")
Do While (reader.Read())
Select Case reader.NodeType
Case XmlNodeType.Element 'Display beginning of element.
If reader.HasAttributes Then 'If attributes exist
While reader.MoveToNextAttribute()
'Display attribute name and value.
Console.Write(" {0}='{1}'", reader.Name, reader.Value)
End While
End If
Case XmlNodeType.Text 'Display the text in each element.
Console.WriteLine(reader.Value)
End Select
Loop
Console.ReadLine()
End Sub
End Module
Last edited by a moderator: