Home » Archived » BIRT » Failed to retrieve all XML nodes
Failed to retrieve all XML nodes [message #870850] |
Wed, 09 May 2012 22:42  |
Filipe Apóstolo Messages: 4 Registered: May 2012 |
Junior Member |
|
|
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 16:43   |
|
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
|
|
| | |
Goto Forum:
Current Time: Tue Mar 28 15:57:27 GMT 2023
Powered by FUDForum. Page generated in 0.01928 seconds
|