Set current node. Use this call before enumerating XML nodes
Status:
Ready
Private Declare Function xdocument_set_current_node
Lib "xmllab_dll.dll"(ByVal DocObject As Long,ByVal XML_NODE As Long)
As Long
The following Microsoft® Visual Basic® example demonstrates how to enumerate nodes
of the XDocument
Private Sub xdocument_to_msxml_dom(ByVal DocObject As Long, ByVal XdocNode As Long, xmlNode As MSXML2.IXMLDOMNode)Private Sub xdocument_to_msxml_dom(ByVal DocObject As Long, ByVal XdocNode As Long)End Sub
'walk through XDocument tree and create DOM tree
Dim Retcode, Nodes, Attributes, NextDocNode, NodeType, NodeNumber, Namelength, ValueLength As Long
Dim NodeName As String, NodeValue As String
Retcode = xdocument_set_current_node (DocObject, XdocNode)
Retcode = xdocument_node_string_length(DocObject, XdocNode, Namelength, ValueLength)
NodeName = String(Namelength + 1, " ")
NodeValue = String(ValueLength + 1, " ")
MsgBox "Namelength = " & Namelength & ",ValueLength= " & ValueLength
Retcode = xdocument_get_node_value(DocObject, XdocNode, NodeName, NodeValue, NodeType)
MsgBox "Node(" & NodeName & ")=" & NodeValue
Retcode = xdocument_node_properties(XdocNode, Nodes, Attributes)
For NodeNumber = 1 To Nodes
Retcode = xdocument_node_next(DocObject, XdocNode, NextDocNode)
If Retcode = 0 Then
' continue with next node
Call xdocument_to_msxml_dom(DocObject, NextDocNode)
End If
Next
Under development
|
Contact Us | | |
|
© 1997-2003 EDMGROUP (Australia) Pty Ltd. All rights reserved. |