Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Parsing XML with JavaScript: No value is returned

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #42273
    Murd
    Member

    Hey Guys!

    I’m working on a project where I need to load data via AJAX-Request. To do this I use a XML-File. Everything just works fine until I try to get the values of an “activity”.

    _THE XML-FILE_


    19
    2013-01-23
    Some text…
    Some text…
    1
    1


    1


    20
    19
    1
    3.0
    Some text…


    My approach was the following:

    var a_id = xmlDoc.getElementsByTagName(“activity”)[0].childNodes[0].nodeValue;

    But this returns nothing.

    Any idea how to “navigate” to “a_id”?

    #122415
    rosspenman
    Participant

    Could you make a [CodePen](http://codepen.io)? That might make it a bit easier to see what’s going on and try stuff out.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.