CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Help!!!

  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Help!!!

    I am a novice at XML and trying to load a XML Document into a DOMObject I have created. For Example:

    Dim xmldoc As MSXML2.DOMDocument30
    Set xmldoc = CreateObject("Microsoft.XMLDOM")

    ' Check to see if document has data. If it does, don't build it
    If (xmldoc.childNodes.length = 0) Then
    ' Build the XML document
    Set root = xmldoc.CreateNode("element", "MyNode", "")
    xmldoc.appendChild (root)

    Set XMLFirstChild = xmldoc.CreateNode("element", "MySecondNode", "")
    Set child = xmldoc.CreateNode("element", "Hello", "")
    child.Text = "12345"
    XMLFirstChild.appendChild (child)
    root.appendChild (XMLFirstChild)
    End If
    Debug.Print xmldoc.xml

    I want to Load in another XML file (or string) and append it - but I can't see how - somebody help please!!

  2. #2
    Join Date
    Dec 2002
    Posts
    47
    ' try the load method ...

    var bOK = xmldoc.load("input.xml")

    if bOK then
    ' loaded successfully
    end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured