Loading ...
Sorry, an error occurred while loading the content.
 

Bug in Datasource 2.6.0 with XML-Data?

Expand Messages
  • dietrich.frank
    I have a DataTable that uses XML data and works wonderfull with 2.5.2 but refuses to do so with 2.6.0. The table renders but has no data, correction, only the
    Message 1 of 3 , Nov 29, 2008
      I have a DataTable that uses XML data and works wonderfull with 2.5.2
      but refuses to do so with 2.6.0. The table renders but has no data,
      correction, only the last column of data, and some of my formatters
      deliver "undefined".

      in firebug also only one of my columns shows up in the datasource.

      So, after a few hours of head-scratching, I switched to the
      -debug-versions and stepped through the whole process of parsing.

      Doing that, I found that "parseXMLResult" in DataSource throws an
      exception as soon as it falls over an empty (=null) here:

      ...
      var xmlNode = result.getElementsByTagName(key);
      if(xmlNode && xmlNode.item(0) && xmlNode.item(0)) {
      data = xmlNode.item(0).firstChild.nodeValue;
      var item = xmlNode.item(0);
      ...


      I think the if-clause should check for firstChild not being null as
      the corresponding piece of code in 2.5.2 does, where it says:

      ...
      var xmlNode = result.getElementsByTagName(key);
      if(xmlNode && xmlNode.item(0) && xmlNode.item(0).firstChild) {
      data = xmlNode.item(0).firstChild.nodeValue;
      }
      else {
      data = "";
      }
      ...

      adding the "firstChild" makes the parser work and brings my table back
      to life



      regards

      Frank

      P.S.: this happened with the download version that I use locally.
    • Satyam
      This has been reported: https://sourceforge.net/tracker/index.php?func=detail&aid=2144118&group_id=165715&atid=836476 You might want to subscribe to that item
      Message 2 of 3 , Nov 30, 2008
        This has been reported:

        https://sourceforge.net/tracker/index.php?func=detail&aid=2144118&group_id=165715&atid=836476

        You might want to subscribe to that item to get notified when news come out.

        Satyam


        dietrich.frank wrote:
        > I have a DataTable that uses XML data and works wonderfull with 2.5.2
        > but refuses to do so with 2.6.0. The table renders but has no data,
        > correction, only the last column of data, and some of my formatters
        > deliver "undefined".
        >
        > in firebug also only one of my columns shows up in the datasource.
        >
        > So, after a few hours of head-scratching, I switched to the
        > -debug-versions and stepped through the whole process of parsing.
        >
        > Doing that, I found that "parseXMLResult" in DataSource throws an
        > exception as soon as it falls over an empty (=null) here:
        >
        > ...
        > var xmlNode = result.getElementsByTagName(key);
        > if(xmlNode && xmlNode.item(0) && xmlNode.item(0)) {
        > data = xmlNode.item(0).firstChild.nodeValue;
        > var item = xmlNode.item(0);
        > ...
        >
        >
        > I think the if-clause should check for firstChild not being null as
        > the corresponding piece of code in 2.5.2 does, where it says:
        >
        > ...
        > var xmlNode = result.getElementsByTagName(key);
        > if(xmlNode && xmlNode.item(0) && xmlNode.item(0).firstChild) {
        > data = xmlNode.item(0).firstChild.nodeValue;
        > }
        > else {
        > data = "";
        > }
        > ...
        >
        > adding the "firstChild" makes the parser work and brings my table back
        > to life
        >
        >
        >
        > regards
        >
        > Frank
        >
        > P.S.: this happened with the download version that I use locally.
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        > ------------------------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - http://www.avg.com
        > Version: 8.0.175 / Virus Database: 270.9.11/1819 - Release Date: 29/11/2008 10:37
        >
        >
      • Frank Dietrich
        Thanks a lot Satyam Frank *********** REPLY SEPARATOR ***********
        Message 3 of 3 , Nov 30, 2008
          Thanks a lot Satyam

          Frank

          *********** REPLY SEPARATOR ***********

          On 30.11.08 at 09:25 Satyam wrote:

          >This has been reported:
          >
          >https://sourceforge.net/tracker/index.php?func=detail&aid=2144118&group_id=165715&atid=836476
          >
          >You might want to subscribe to that item to get notified when news come
          >out.
          >
          >Satyam
          >
          >
          >dietrich.frank wrote:
          >> I have a DataTable that uses XML data and works wonderfull with 2.5.2
          >> but refuses to do so with 2.6.0. The table renders but has no data,
          >> correction, only the last column of data, and some of my formatters
          >> deliver "undefined".
          >>
          >> in firebug also only one of my columns shows up in the datasource.
          >>
          >> So, after a few hours of head-scratching, I switched to the
          >> -debug-versions and stepped through the whole process of parsing.
          >>
          >> Doing that, I found that "parseXMLResult" in DataSource throws an
          >> exception as soon as it falls over an empty (=null) here:
          >>
          >> ...
          >> var xmlNode = result.getElementsByTagName(key);
          >> if(xmlNode && xmlNode.item(0) && xmlNode.item(0)) {
          >> data = xmlNode.item(0).firstChild.nodeValue;
          >> var item = xmlNode.item(0);
          >> ...
          >>
          >>
          >> I think the if-clause should check for firstChild not being null as
          >> the corresponding piece of code in 2.5.2 does, where it says:
          >>
          >> ...
          >> var xmlNode = result.getElementsByTagName(key);
          >> if(xmlNode && xmlNode.item(0) && xmlNode.item(0).firstChild) {
          >> data = xmlNode.item(0).firstChild.nodeValue;
          >> }
          >> else {
          >> data = "";
          >> }
          >> ...
          >>
          >> adding the "firstChild" makes the parser work and brings my table back
          >> to life
          >>
          >>
          >>
          >> regards
          >>
          >> Frank
          >>
          >> P.S.: this happened with the download version that I use locally.
          >>
          >>
          >>
          >>
          >>
          >>
          >>
          >>
          >>
          >>
          >>
          >> ------------------------------------
          >>
          >> Yahoo! Groups Links
          >>
          >>
          >>
          >> ------------------------------------------------------------------------
          >>
          >>
          >> No virus found in this incoming message.
          >> Checked by AVG - http://www.avg.com
          >> Version: 8.0.175 / Virus Database: 270.9.11/1819 - Release Date:
          >29/11/2008 10:37
          >>
          >>
          >
          >------------------------------------
          >
          >Yahoo! Groups Links
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.