Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Issues with XML Data source
Migrateduser
<p>I have to use an XML as a data source in my report.<br>
My xml has multiple child tags with the same name(ex. <author>). Please refer the XML pasted below.</p>
<p> </p>
<p><em><?xml version="1.0" encoding="ISO-8859-1"?></em></p>
<p><em><BookStore><br>
<Book><br>
<title>History</title><br>
<author>Tom</author><br>
<copies>10;</copies><br>
<price>80</price><br>
</Book></em></p>
<p><em><Book><br>
<title>Basic Mathematics</title><br>
<author>Roy</author><br>
<author>Jon</author><br>
<copies>5</copies><br>
<price>100</price><br>
</Book></em></p>
<p><em><Book><br>
<title>Java</title><br>
<author>Harry</author><br>
<author>Potter</author><br>
<copies>6</copies><br>
<price>100</price><br>
</Book><br>
</BookStore></em></p>
<p> </p>
<p>I have added a XML data source and a dataset in my report. I have made the following mappings in my XML dataset.</p>
<p>Row mapping: /BookStore/Book<br>
Column Mapping: Mapped all the child tags</p>
<p>
In the data set, I am getting three records, one for each of the <Book> tag. But, the author column contains the value of only the first tag.For example, the second record contains only "Roy". The second <author> tag is not being recognised by the BIRT. I need to get both "Roy" & "Jon" from the second <Book> element. And, I need to get both "Harry" & "Potter" from the third <Book> element. Can you please let me know how to get all the values from tags with the same name into the dataset.</p>
<p>I have attached the rpt design file and xml source I'm using.</p>
<p>Appreciate your help. Please let me know how to design the XML dataset.</p>
Find more posts tagged with
Comments
There are no comments yet