0 Replies Latest reply on Mar 8, 2009 6:30 PM by mickykitsu

    XML nodeValue is null

      I'm having a strange issue during my XML parsing. As i attempt to call up the nodeValue

      Forgive the clumsy code, but in theory it should work just fine. The only issue that i've been having with it is at the indicated place.

      As i try to call up the nodeValue of a child within the script, the result is 'null'... And yet it shouldn't be because in the XML document, the node clearly has a value. I dont get it at all...


      EventXML = new XML();
      EventXML.onLoad = load_Event;
      function load_Event(ok) {
      if (ok == true) {
      this.ignoreWhite = true;

      function ProcessEventXML(EventXMLNode) {
      if (EventXMLNode.nodeName.toUpperCase() == "TIMELINE") {
      for (TimelineChildren=EventXMLNode.childNodes, i=0; i<TimelineChildren.length; i++) {
      var TimelineChild = TimelineChildren[ i];
      if (TimelineChild.nodeName.toUpperCase() == "ENTRY") {
      for (EntryChildren = TimelineChild.childNodes, k=0; k<EntryChildren.length; k++) {
      var EntryChild = EntryChildren[k];
      if (EntryChild.nodeName.toUpperCase() == "ENTRY_ID") {
      trace(EntryChild.nodeValue); <-- the problem is here

      The XML looks like this:

      <caption>Text goes here</caption>