CountChildNodes |
Top Previous Next |
Example VBScript Code
Private Sub DemoXML()
Dim oXML, ndRoot, ndList Dim sBuff, i
'Create the object Set oXML = oUTILITIES.NewCommandoXMLObject()
'Using the With / End With statements make for easy shortcuts With oXML 'Open an XML File If Not .OpenFromFile(oUTILITIES.ApplicationPath & "MyFileName.XML") Then SMEvent.Raise "ERROR", "XML File Open Failed" End If Set ndRoot = .GetRootElement() i = .CountChildNodes(ndRoot, "OBR") MsgBox "This document has " & i & " OBR child nodes" End With 'Clean up the objects
Set ndRoot = Nothing Set oXML = Nothing End Sub
See Also: oUTILITIES.NewCommandoXMLObject() |