Skip to main content



      Home
Home » Archived » BIRT » Newbie: Using an XML data source
Newbie: Using an XML data source [message #258516] Tue, 16 October 2007 13:49 Go to next message
Eclipse UserFriend
Originally posted by: probertm.gmail.com

Hi ..

New to BIRT and liking it a lot! Thank you.

I want to use an XML data source, which is fine and easy. Then I want to
define the dataset, which I can sort of do.

The XML is a dataset extract from an Oracle DB and then modified. It
looks something like:

<?xml version="1.0"?>
<Library>
<Documents>
<ROW num="1">
<TEXT>Alice In Wonderland</TEXT>
</ROW>
<ROW num="2">
<TEXT>Through the Looking Glass</TEXT>
</ROW>
<ROW num="3">
<TEXT>Wind in the Willows</TEXT>
</ROW>
<ROW num="4">
<TEXT>House at Pooh Corner</TEXT>
</ROW>
</Documents>
</Library>

My problem is that I don't know how to get the reporter to iterate over
the num part of the XPath. I define

Root = /Library/Documents
Item = /ROW@num
Book = /ROW/TEXT

And it returns just the first item.
Any help appreciated.

Regards,
mark
Re: Newbie: Using an XML data source [message #258667 is a reply to message #258516] Thu, 18 October 2007 02:38 Go to previous messageGo to next message
Eclipse UserFriend
Hey,

http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1 /xmlds/index.php

I hope it will assist you.
Re: Newbie: Using an XML data source [message #258741 is a reply to message #258516] Thu, 18 October 2007 14:08 Go to previous message
Eclipse UserFriend
Originally posted by: vdodson.kc.rr.com

Hi Mark,

Make sure the element you define in the Table Mapping is the repeating
element. In this case, Document only repeats once so only returns one
iteration of the data. Use /Library/Documents/Row for the table
mapping, then /@num and /TEXT for the column mappings and you will get
all 4 rows.

Virgil Dodson
http://www.birt-exchange.com

Mark Probert wrote:
>
> Hi ..
>
> New to BIRT and liking it a lot! Thank you.
>
> I want to use an XML data source, which is fine and easy. Then I want
> to define the dataset, which I can sort of do.
>
> The XML is a dataset extract from an Oracle DB and then modified. It
> looks something like:
>
> <?xml version="1.0"?>
> <Library>
> <Documents>
> <ROW num="1">
> <TEXT>Alice In Wonderland</TEXT>
> </ROW>
> <ROW num="2">
> <TEXT>Through the Looking Glass</TEXT>
> </ROW>
> <ROW num="3">
> <TEXT>Wind in the Willows</TEXT>
> </ROW>
> <ROW num="4">
> <TEXT>House at Pooh Corner</TEXT>
> </ROW>
> </Documents>
> </Library>
>
> My problem is that I don't know how to get the reporter to iterate over
> the num part of the XPath. I define
>
> Root = /Library/Documents
> Item = /ROW@num
> Book = /ROW/TEXT
>
> And it returns just the first item.
> Any help appreciated.
>
> Regards,
> mark
>
Previous Topic:birt Excel emitter
Next Topic:is it possible to link to specific page?
Goto Forum:
  


Current Time: Tue Jul 22 18:28:37 EDT 2025

Powered by FUDForum. Page generated in 0.03653 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top