Home » Archived » BIRT » Failed to retrieve all XML nodes
Failed to retrieve all XML nodes [message #870850] |
Wed, 09 May 2012 18:42  |
Eclipse User |
|
|
|
Hello to everybody!!
I've started to use BIRT today.
And I found it fantastic, congrats!!!
However I'm facing a problem, I'm not finding the solution (i've followed tutorials, advanced examples and explored every items of BIRT palette)
I added a data source from a XML file ->Ok
the XML file is a project file output of a software which contains a list of systems.
Each system as attributes for example 'system name', read/write variables control cycle, and each system is composed by a dynamic variables list.
Down here I've create a example XML:
<Project>
<System>
<Att1 a=a1, b=b2 ></Att1>
<Att2 a=a1, b=b2 ></Att2>
<VariablesList>
<Variable a=a1, b=b1>
<Name>VarA</Name>
<Att2>some data</Att2>
.....
</Variable>
<Variable a=a1, b=b1>
<Name>VarA</Name>
<Att2>some data</Att2>
.....
</Variable>
<Variable a=a1, b=b1>
<Name>VarA</Name>
<Att2>some data</Att2>
.....
</Variable>
</VariablesList>
</System>
<System>
<Att1 a=a1, b=b2 ></Att1>
<Att2 a=a1, b=b2 ></Att2>
<VariablesList>
<Variable a=a1, b=b1>
<Name>VarA</Name>
<Att2>some data</Att2>
.....
</Variable>
<Variable a=a1, b=b1>
<Name>VarA</Name>
<Att2>some data</Att2>
.....
</Variable>
<Variable a=a1, b=b1>
<Name>VarA</Name>
<Att2>some data</Att2>
.....
</Variable>
</VariablesList>
</System>
I'm able to retrieve and report all data from each system as explained at the tutorial.
But the data set is only returning 1 variable of each system and (all my files have in average 5 variables per system)
Creating a data set using <Variable> all variables are retrived, but now I'm not capable to group by system.
My desired output would be something like:
->SysA
VarA Att1, Att2
VarB Att1, Att2
VarC Att1, Att2
->SysB
VarD Att1, Att2
VarE Att1, Att2
VarF Att1, Att2
With the first data set my output is:
->SysA
VarA Att1, Att2
->SysB
VarD Att1, Att2
with the second:
VarA Att1, Att2
VarB Att1, Att2
VarC Att1, Att2
VarD Att1, Att2
VarE Att1, Att2
VarF Att1, Att2
What am I doing wrong?
How can I solve this?
I've Used Data Cube but the problem is the same because I need to link the variables name from both data set and the first has only one variable.
Sorry if the post is to long but is to explain well the problem,
Thanks in Advance,
FA
|
|
|
Re: Failed to retrieve all XML nodes [message #871054 is a reply to message #870850] |
Thu, 10 May 2012 12:43   |
Eclipse User |
|
|
|
In your xml do you have anything that lets you know you are in System A
or System B?
Jason
On 5/9/2012 6:42 PM, Filipe Apóstolo wrote:
> Hello to everybody!!
>
> I've started to use BIRT today. And I found it fantastic, congrats!!!
>
> However I'm facing a problem, I'm not finding the solution (i've
> followed tutorials, advanced examples and explored every items of BIRT
> palette)
>
> I added a data source from a XML file ->Ok
>
> the XML file is a project file output of a software which contains a
> list of systems.
> Each system as attributes for example 'system name', read/write
> variables control cycle, and each system is composed by a dynamic
> variables list.
>
> Down here I've create a example XML:
> <Project>
> <System>
> <Att1 a=a1, b=b2 ></Att1>
> <Att2 a=a1, b=b2 ></Att2>
> <VariablesList>
> <Variable a=a1, b=b1>
> <Name>VarA</Name>
> <Att2>some data</Att2>
> .....
> </Variable>
>
> <Variable a=a1, b=b1>
> <Name>VarA</Name>
> <Att2>some data</Att2>
> .....
> </Variable>
>
> <Variable a=a1, b=b1>
> <Name>VarA</Name>
> <Att2>some data</Att2>
> .....
> </Variable>
> </VariablesList>
> </System>
>
> <System>
> <Att1 a=a1, b=b2 ></Att1>
> <Att2 a=a1, b=b2 ></Att2>
> <VariablesList>
> <Variable a=a1, b=b1>
> <Name>VarA</Name>
> <Att2>some data</Att2>
> .....
> </Variable>
>
> <Variable a=a1, b=b1>
> <Name>VarA</Name>
> <Att2>some data</Att2>
> .....
> </Variable>
>
> <Variable a=a1, b=b1>
> <Name>VarA</Name>
> <Att2>some data</Att2>
> .....
> </Variable>
> </VariablesList>
> </System>
>
> I'm able to retrieve and report all data from each system as explained
> at the tutorial.
> But the data set is only returning 1 variable of each system and (all my
> files have in average 5 variables per system)
>
> Creating a data set using <Variable> all variables are retrived, but now
> I'm not capable to group by system.
>
> My desired output would be something like:
>
> ->SysA
> VarA Att1, Att2
> VarB Att1, Att2
> VarC Att1, Att2
> ->SysB
> VarD Att1, Att2
> VarE Att1, Att2
> VarF Att1, Att2
>
> With the first data set my output is:
> ->SysA VarA Att1, Att2
> ->SysB
> VarD Att1, Att2
> with the second:
> VarA Att1, Att2
> VarB Att1, Att2
> VarC Att1, Att2
> VarD Att1, Att2
> VarE Att1, Att2
> VarF Att1, Att2
>
> What am I doing wrong?
> How can I solve this?
> I've Used Data Cube but the problem is the same because I need to link
> the variables name from both data set and the first has only one variable.
>
> Sorry if the post is to long but is to explain well the problem,
> Thanks in Advance,
> FA
|
|
| |
Re: Failed to retrieve all XML nodes [message #871197 is a reply to message #871195] |
Fri, 11 May 2012 07:47  |
Eclipse User |
|
|
|
Well, I found out how to solve the problem.
I have build a data set for each internal list:
in the above example I could create SystemDataSet, and VariablesDataSet. For each data set I select the xml path to point for the correspondent node.
And now the trick was at the collum binding, I added allways the parent node name for each sublist.
For exmaple I added the system name to the variables data set.
Then I can group and/or filter the variables by System name.
|
|
|
Goto Forum:
Current Time: Tue May 13 02:04:41 EDT 2025
Powered by FUDForum. Page generated in 0.02784 seconds
|