Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Repeating elements in XML DataSource Not Loaded
sharad
Hello,<br />
Whenever I load an XML Data source if i have a element repeating in it then in the column mappings in BIRT I can only see the first element of the repeating element. BIRT column mapping does not show up the multiple elements of repeating element. For Ex. If I have the following xml data source:<br />
<p class='bbc_left'><w:p wsp:rsidR="002A12C6" wsp:rsidRDefault="002A12C6" wsp:rsidP="002A12C6"><br />
<w:pPr><br />
<w:pStyle w:val="BulletSub"/><br />
<w:listPr><br />
<wx:t wx:val="?"/><br />
<wx:font wx:val="Symbol"/><br />
</w:listPr><br />
</w:pPr><br />
<w:r><br />
<w:t>String 1</w:t><br />
</w:r><br />
</w:p><br />
<w:p wsp:rsidR="002A12C6" wsp:rsidRDefault="002A12C6" wsp:rsidP="0<br />
02A12C6"><br />
<w:pPr><br />
<w:pStyle w:val="BulletSub"/><br />
<w:listPr><br />
<wx:t wx:val="?"/><br />
<wx:font wx:val="Symbol"/><br />
</w:listPr><br />
</w:pPr><br />
<w:r><br />
<w:t>String 2</w:t><br />
</w:r><br />
</w:p></p>
<br />
In the above XML in column mappings I only get to see the first <w:p> element and the second one is not available at all.<br />
<br />
Any ideas on how to get all the elements loaded?<br />
<br />
Regards,<br />
Sharad
Find more posts tagged with
Comments
mwilliams
Hi Sharad,
Can you post a sample xml file and a report that uses it, so I can see what you've done. Then, I can test on it as well.
sharad
Hello Michael,
PFA sample XML file with repeating element 'title', report file and the output file.
The output file contains only first title but I want to get both the 'title' element values.
Please let me know if you need anything else.
Regards,
Sharad
mwilliams
Sharad,
I wanted you to put together a report and XML file and attach them in here so I could see what you've done and so I could test with it. Thanks!
Also, if you could include your BIRT version so I can run the report you attach in the correct version, that'd be great!
sharad
Hello Michael,
I am using BIRT v2.6.1
I have attached the report I am working on. It is very simple, I am just trying to map a XML element to a column. But in the column mappings editor when we browse through all the elements of XML data source I can only see one element['title' in this case] of the repeating element as mentioned below.
Actually my input XML datasource contains 2 title elements but I don't see 2 elements in the column mappings editor.
Please let me know if the issue is not clear.
Regards,
Sharad
mwilliams
Sharad,
It looks like the rptdesign file and XML file didn't get attached for some reason.
sharad
Here it is..
mwilliams
Sharad,
You just need to drag the dataSet into the report design layout. It will create a table with the field in the detail row, then you will see Title1 and Title2. A single data element doesn't iterate through the dataSet, you have to use a table or list.