Problem with XML data source

crowt999
edited February 11, 2022 in Analytics #1
Hello all!

I am building an XML data source with the following structure, with the goal of returning the VALUE_DATE, NAV_ID from the INDEX section, and the NAV_ID and VALUE_DATE from the STUB section (renamed to STUB_NAV_ID and STUB_VALUE_DATE)

The XPATH expression is: /INDEX/STUB_set/STUB

<?xml version="1.0"?>
<INDEX>
<FUND>22984</FUND>
<PORTFOLIO_NAME>TEST</PORTFOLIO_NAME>
<FULL_NAME>TEST Name</FULL_NAME>
<START_SNAPTIME>Oct 18 2007 10:10:05:373PM</START_SNAPTIME>
<SNAPTIME>Oct 18 2007 10:10:05:380PM</SNAPTIME>
<START_DATE>5/31/07</START_DATE>
<VALUE_DATE>6/30/07</VALUE_DATE>
<PRICE_HIERARCHY>NAV</PRICE_HIERARCHY>
<NAV_ID>310</NAV_ID>
<STUB_set SIZE="2">
<STUB>
<NAV_ID>309</NAV_ID>
<VALUE_DATE>6/30/07</VALUE_DATE>
</STUB>
<STUB>
<NAV_ID>308</NAV_ID>
<VALUE_DATE>6/11/07</VALUE_DATE>
</STUB>
</STUB_set>
</INDEX>

This will return:
VALUE_DATE NAV_ID STUB_NAV_ID STUB_VALUE_DATE
6/30/07 310 309 6/30/07
6/30/07 310 308 6/11/07

In some cases, the XML will not have a stub set of data, and look like this:

<?xml version="1.0"?>
<INDEX>
<FUND>22984</FUND>
<PORTFOLIO_NAME>TEST </PORTFOLIO_NAME>
<FULL_NAME> TEST Name </FULL_NAME>
<START_SNAPTIME>Oct 19 2007 4:21:56:300PM</START_SNAPTIME>
<SNAPTIME>Oct 19 2007 4:21:56:303PM</SNAPTIME>
<START_DATE>8/31/07</START_DATE>
<VALUE_DATE>9/30/07</VALUE_DATE>
<PRICE_HIERARCHY>NAV</PRICE_HIERARCHY>
<NAV_ID>363</NAV_ID>
<BASE_CURR>USD</BASE_CURR>
<STUB_set SIZE="0"/>
</INDEX>

This used to return:

VALUE_DATE NAV_ID STUB_NAV_ID STUB_VALUE_DATE
6/30/07 310

My problem is that when I originally developed the report that uses this, it worked in the development tool. I was able to preview the data in the data source, and when running the report in Eclipse, it worked fine.
The report was released, and runs through our birt server with no problem.

Now ? all of the sudden, when the second sample XML is previewed in the data set, it returns nothing? The first file will return the proper 2 rows. I can no longer preview the report in the DEV environment, bu the strange thing is that the report still works when run through the server?

Does anyone have a clue as to why this would stop working in the Eclipse tool while developing the report? Could something have gotten corrupted?

I am using BIRT all in one, 2.1.2. (some of the plug-ins are ver 2.1.1)

Any help would be appreciated..
Dean

Comments

  • lpurba
    edited December 31, 1969 #2
    <blockquote class='ipsBlockquote' data-author="crowt999"><p>Hello all!<br />
    <br />
    --- deleted ---<br />
    <br />
    In some cases, the XML will not have a stub set of data, and look like this:<br />
    <br />
    <?xml version="1.0"?><br />
    <INDEX><br />
    <FUND>22984</FUND><br />
    <PORTFOLIO_NAME>TEST </PORTFOLIO_NAME><br />
    <FULL_NAME> TEST Name </FULL_NAME><br />
    <START_SNAPTIME>Oct 19 2007 4:21:56:300PM</START_SNAPTIME><br />
    <SNAPTIME>Oct 19 2007 4:21:56:303PM</SNAPTIME><br />
    <START_DATE>8/31/07</START_DATE><br />
    <VALUE_DATE>9/30/07</VALUE_DATE><br />
    <PRICE_HIERARCHY>NAV</PRICE_HIERARCHY><br />
    <NAV_ID>363</NAV_ID><br />
    <BASE_CURR>USD</BASE_CURR><br />
    <STUB_set SIZE="0"/><br />
    </INDEX><br />
    <br />
    This used to return: <br />
    <br />
    VALUE_DATE NAV_ID STUB_NAV_ID STUB_VALUE_DATE<br />
    6/30/07 310 <br />
    <br />
    -- deleted ---<br />
    <br />
    Dean</p></blockquote>
    <br />
    Hi,<br />
    I just wonder, don't you think you have to handle non-existent stub set of data in your javascript with DOMParser? Just a thought.<br />
    <br />
    -Laurent
  • crowt999
    edited December 31, 1969 #3
    Since this used to work fine, I would prefer to try & figure out why it stopped working, rather than change the data source. I could always try that as a last resort, but we are heavy into development now, and time is very short..
    Dean