EnumerateNodes - cXMLDOMDocumentFragment

Provides a way to enumerate through all child nodes

Type: Procedure

Parameters: Integer iMsg Handle hoReceiver String sVal1 String sVal2

ParameterDescription
iMsgThe message that is sent
hoReceiverThe object that the message is sent to
sVal1Parameter, which you define
sVal2Parameter, which you define


Syntax
Procedure EnumerateNodes Integer iMsg Handle hoReceiver String sVal1 String sVal2

Call: Send EnumerateNodes iMsg hoReceiver sVal1 sVal2


Description

EnumerateNodes provides a way to enumerate through all child nodes. For each valid node type the message iMsg is sent to the object hoReceiver. Three parameters are passed to this method: hoNode (the ID of the XML node), sVal1 and sVal2 (which you define). All node objects are created and destroyed as needed.

Example

Procedure ShowAtt handle hoNode integer  iLevel
    Showln iLevel " : " (psName(honode)) " : " (psNodeValue(hoNode))
End_Procedure

Procedure ShowNode handle hoNode string sLevel string sX
    integer i

    ShowLn sLevel " :" (psNodeName(honode))
    Move sLevel to i
    Increment i
    Send EnumerateAttributes of hoNode msg_showAtt  self i
    Send EnumerateElements   of hoNode msg_showNode self i sX
End_Procedure

Procedure ShowAll
    handle hoNode

    Get DocumentElement of hoMyXML to hoNode
    Send ShowNode hoNode 1 ""
End_Procedure

See Also

EnumerateElements | EnumerateAttributes