I have to use an XML as a data source in my report. My xml has multiple child tags with the same name(ex. author). Please refer the XML pasted below.
<BookStore>
<Book>
<title>History</title>
<author>Tom</author>
<copies>10;</copies>
<price>80</price>
</Book>
<Book>
<title>Basic Mathematics</title>
<author>Roy</author>
<author>Jon</author>
<copies>5</copies>
<price>100</price>
</Book>
<Book>
<title>Java</title>
<author>Harry</author>
<author>Potter</author>
<copies>6</copies>
<price>100</price>
</Book>
</BookStore>
I have added a XML data source and a dataset in my report. I have made the following mappings in my XML dataset.
Row mapping: /BookStore/Book and Column Mapping: Mapped all the child tags
In the data set, I am getting three records, one for each of the 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.
Appreciate your help. Please let me know how to design the XML dataset.