Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Node set from XML data source?
Node set from XML data source? [message #368617] Mon, 15 June 2009 23:46 Go to next message
Eclipse UserFriend
Originally posted by: fhj.adsf.com

I am using the below xml file as datasource:

<root>
<lines>
<line order="0">
<content id="A" value="0_A"/>
<content id="B" value="0_B"/>
<content id="C" value="0_C"/>
<content id="D" value="0_D"/>
<content id="E" value="0_E"/>
</line>
<line order="1">
<content id="A" value="1_A"/>
<content id="B" value="1_B"/>
<content id="C" value="1_C"/>
<content id="D" value="1_D"/>
<content id="E" value="1_E"/>
</line>
</lines>
</root>


I use the following row mapping:

/root

In the following its assumed that its not allowed to change the above row
mapping.

When I define this column mapping:

Name: A
XPath: /lines/line/content[@id="A"]/@value

and drag it into a table the result is:

0_A

But I need the result to be:

0_A
1_A

How do I get all values from all lines where id=A ? Remeber that its not
allowed to change the row mapping. I have the feeling that its impossible
but why??
Re: Node set from XML data source? [message #368627 is a reply to message #368617] Tue, 16 June 2009 14:58 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Try a row xpath syntax as

/root/lines/line/content[@id="A"]

and column mapping
/@id
and
/@value

Jason


mlt wrote:
> I am using the below xml file as datasource:
>
> <root>
> <lines>
> <line order="0">
> <content id="A" value="0_A"/>
> <content id="B" value="0_B"/>
> <content id="C" value="0_C"/>
> <content id="D" value="0_D"/>
> <content id="E" value="0_E"/>
> </line>
> <line order="1">
> <content id="A" value="1_A"/>
> <content id="B" value="1_B"/>
> <content id="C" value="1_C"/>
> <content id="D" value="1_D"/>
> <content id="E" value="1_E"/>
> </line>
> </lines>
> </root>
>
>
> I use the following row mapping:
>
> /root
>
> In the following its assumed that its not allowed to change the above row
> mapping.
>
> When I define this column mapping:
>
> Name: A
> XPath: /lines/line/content[@id="A"]/@value
>
> and drag it into a table the result is:
>
> 0_A
>
> But I need the result to be:
>
> 0_A
> 1_A
>
> How do I get all values from all lines where id=A ? Remeber that its not
> allowed to change the row mapping. I have the feeling that its impossible
> but why??
>
>
Previous Topic:XPath 1.0 or 2.0?
Next Topic:ClassNotFound in JBoss but tomcat fine!!
Goto Forum:
  


Current Time: Thu Apr 25 11:24:07 GMT 2024

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

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

Back to the top