Copyright ® (1997-2003) EDMGROUP Pty Ltd - XML Database - XSTORAGE Reference

xdocument_node_value

[This is preliminary documentation and subject to change.]

Set XML Node value
Status:

Ready

Visual Basic Syntax

Private Declare Function xdocument_node_value
Lib "xmllab_dll.dll"

(ByVal XML_CURSOR As Long,ByVal XML_NODE As String)
As Long

 

Example


Private Sub xmldom_to_xstorage(ByVal FILENAME As String)
Dim DocObject, XMLROOT, XML_DOC_ROOT, XML_CHILD, Res, Retcode As Long
Dim xmldom As MSXML2.DOMDocument
Dim child As MSXML2.IXMLDOMNode
Dim NodeAttribute As MSXML2.IXMLDOMNode
Dim Root As MSXML2.IXMLDOMElement
Dim Name As String, Value As String
Set xmldom = New MSXML2.DOMDocument
xmldom.async = False
xmldom.validateOnParse = False
xmldom.Load (FILENAME)
Set Root = xmldom.documentElement
'create XDocument now
Res = xdocument_create(FILENAME, DocObject)
If Res = 0 Then
'start creating XDocument
XMLROOT = xdocument_root(DocObject)
Name = Root.NodeName
If Root.NodeValue <> Null Then
Value = Root.NodeValue
Else
Value = ""
End If
Retcode = xdocument_add_node(DocObject, XMLROOT, 1, Name, Value, XML_DOC_ROOT)
If Retcode = 0 Then
'create node attributes
For Each NodeAttribute In Root.Attributes
Res = xdocument_add_attr(XML_DOC_ROOT, NodeAttribute.NodeName, NodeAttribute.NodeValue)
Next
For Each child In Root.childNodes
Name = child.NodeName
If child.NodeValue <> Null Then
Value = child.NodeValue
Else
Value = ""
End If
Res = xdocument_add_node(DocObject, XML_DOC_ROOT, 1, Name, Value, XML_CHILD)
If Res = 0 Then
'navigate through childs
Call navigate_tree(DocObject, child, XML_CHILD)
End If
Next
End If
End If
'remove xmldom
Set xmldom = Nothing
End Sub
[C/C++]

C/C++ Syntax

   

Under development

C/C++ Return Values

C Sample

 

Remarks

 

See Also

 

  Contact Us   |   |  

 © 1997-2003 EDMGROUP (Australia) Pty Ltd. All rights reserved.