Set objReader = DotNetFactory.CreateInstance(“System.Xml.XmlReader”, “System.Xml”)
set XmlReader=objReader.Create(“C:\Documents and Settings\Jay\Desktop\3.xml”)
while (XmlReader.Read())
If XmlReader.NodeType = “XmlDeclaration” or XmlReader.NodeType = “Element”Then
Reporter.ReportEvent micPass, “NodeType:”&XmlReader.NodeType &” Name :”& XmlReader.Name& ” is at Depth:”& XmlReader.Depth,”"
If XmlReader.HasValue Then
Reporter.ReportEvent micPass, ” Value: “& XmlReader.Value,”"
End If
Reporter.ReportEvent micPass, “Element:”& XmlReader.Name&” has attribute(s)”&”:”& XmlReader.AttributeCount,”"
If XmlReader.AttributeCount > 0 Then
while XmlReader.MoveToNextAttribute()
fn = XmlReader.Name
ns = XmlReader.NamespaceURI
Reporter.ReportEvent micPass,” Attribute:”&fn &” Value: “& ns&” Attribute:”& XmlReader.GetAttribute(fn, ns),”"
wend
End If
End If
wend
XmlReader.Close()
set XmlReader=objReader.Create(“C:\Documents and Settings\Jay\Desktop\3.xml”)
while (XmlReader.Read())
If XmlReader.NodeType = “XmlDeclaration” or XmlReader.NodeType = “Element”Then
Reporter.ReportEvent micPass, “NodeType:”&XmlReader.NodeType &” Name :”& XmlReader.Name& ” is at Depth:”& XmlReader.Depth,”"
If XmlReader.HasValue Then
Reporter.ReportEvent micPass, ” Value: “& XmlReader.Value,”"
End If
Reporter.ReportEvent micPass, “Element:”& XmlReader.Name&” has attribute(s)”&”:”& XmlReader.AttributeCount,”"
If XmlReader.AttributeCount > 0 Then
while XmlReader.MoveToNextAttribute()
fn = XmlReader.Name
ns = XmlReader.NamespaceURI
Reporter.ReportEvent micPass,” Attribute:”&fn &” Value: “& ns&” Attribute:”& XmlReader.GetAttribute(fn, ns),”"
wend
End If
End If
wend
XmlReader.Close()
Comments