OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [xml-dev] DOM

Title: DOM
Something like this...
    Dim xmldoc As New MSXML2.DOMDocument
    xmldoc.Load "c:\temp\test.xml"
    Dim firstnames As MSXML2.IXMLDOMNodeList
    Set firstnames = xmldoc.getElementsByTagName("firstname")
    Dim i As Integer
    i = 0
    Do While i < firstnames.Length
        Response.write firstnames.Item(i).text
        i = i + 1
-----Original Message-----
From: Avital Nagar [mailto:Avital@cellact.com]
Sent: Monday, October 08, 2001 6:41 AM
To: xml-dev@lists.xml.org
Subject: [xml-dev] DOM

If I have an xml document that looks like this:


        <location> US </location>


                <title> Snow White </title>


                        <firstname> Liza </firstname>

                        <lastname> Baker </lastname>



                        <firstname> Tanith </firstname>

                        <lastname> Lee </lastname>





How can I get the firstnames? I have to display only the first name in asp. I know I have to use something with getelementsbytagname and firstChild.