Results 1 to 2 of 2

Thread: XML Nodes

  1. #1

    Thread Starter
    Hyperactive Member gmatteson's Avatar
    Join Date
    Feb 2002
    Location
    Rhode Island, USA
    Posts
    293

    XML Nodes

    How do I get the total number of nodes in an xml document?

    i've tried
    dim myxmlnode as xml.xmlnode

    msgbox myxmlnode.childnodes.count

    it doesn't work, any ideas? thank you.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    VB Code:
    1. Dim xdoc As New XmlDocument
    2.         xdoc.Load("..\data.xml")
    3.         Dim xnods As XmlNodeList = xdoc.SelectNodes("//*")
    4.         MsgBox(xnods.Count)

    Although remember that the root counts as well as any parent nodes.

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