www.webdeveloper.com
Results 1 to 2 of 2

Thread: xpath javascript how

  1. #1
    Join Date
    Sep 2005
    Posts
    1

    xpath javascript how

    I have following xml:
    <root>
    <node id="1" type="1" /></node>
    <node id="2" type="2" /></node>
    </root>
    How find id and type in javascript (crossbrowser example need) ?

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,119
    u can use standard dom methods such as
    document.getElementsByTagName("node");
    The above will return a nodelist, you can access each node just as you would an array item, then you can get the attribute value for each attribute...
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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



Recent Articles