how to load the xml document and parse the file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how to load the xml document and parse the file

  1. #1
    shiva Guest

    how to load the xml document and parse the file


    i am trying xml for the first time and i tried the following


    set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
    xmlDoc.async = false
    xmlDoc.load("First.xml")
    Dim root
    Dim xmlDoc
    Dim child

    'Set root to the XML document's root element, COLLECTION:
    Set root = xmlDoc.documentElement
    'Walk from the root to each of its child nodes:

    For Each child In root.childNodes
    Response.Write child.text & "<br>"
    Next

    but i am getting the error :

    Microsoft VBScript runtime error '800a01a8'
    Object required

    i have ie5 and iis4 on win NT 4.0 also i have installed the latest microsoft
    dom.

    please respond.
    thanks
    shiva


  2. #2
    RK Guest

    Re: how to load the xml document and parse the file


    "shiva" <sivakumarkr@yahoo.com> wrote:
    >
    >i am trying xml for the first time and i tried the following
    >
    >
    >set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")
    >xmlDoc.async = false
    >xmlDoc.load("First.xml")
    >Dim root
    >Dim xmlDoc
    >Dim child
    >
    >'Set root to the XML document's root element, COLLECTION:
    >Set root = xmlDoc.documentElement
    >'Walk from the root to each of its child nodes:
    >
    >For Each child In root.childNodes
    > Response.Write child.text & "<br>"
    >Next
    >
    >but i am getting the error :
    >
    >Microsoft VBScript runtime error '800a01a8'
    >Object required
    >
    >i have ie5 and iis4 on win NT 4.0 also i have installed the latest microsoft
    >dom.
    >
    >please respond.
    >thanks
    >shiva
    >

    This will work if you surround it by asp tags <% %>. You are getting an
    error on the Response.Write because that is an ASP object. So you need the
    tags for that reason.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center