GetNodeChildren()

Top  Previous  Next

Object: EHL7.QSXML

FileName: EHL7.dll

 

METHOD

 

Name: GetNodeChildren()

Parameters:

1.objNode (XML Node Object) the parent node

 

Returns: Object (See below)

Description: This method returns the nodeList of all children of objNode, returns Nothing if the node object has no children.

 

 

*XML Note: The object returned is actually of type "MSXML2.IXMLDOMNodeList" and is the functional equivalent of calling the .childNodes method of an item of type "MSXML2.IXMLDOMNode"

 

 

Example:

Dim myXMLObj As New EHL7.QSXML

Dim strXML As String

Dim ndRT As Object

Dim ndChildren As Object

Dim i As Long

With myXmlObj

.ClearErrors

strXML = "<GOODXML></GOODXML>"

Call .OpenFromString(strXML)

If .IsError Then

  MsgBox .LastError

  .ClearErrors

  Exit Sub

End If

'Add 3 child nodes

strXML = "<CHILD></CHILD>"

Set ndRT = .GetRootElement()

Call .XMLAddNode ndRT,strXML

Call .XMLAddNode ndRT,strXML

Call .XMLAddNode ndRT,strXML

Set ndChildren = .GetRootChildren()

'Is the same as calling

Set ndChildren = .GetNodeChildren(ndRT)

End With

Set myXMLObj = Nothing