Jump to content
Changes to the Jaspersoft community edition download ×

queryString problem - XML file as input


mathewrond

Recommended Posts

Hi,

I am trying to query XML file for some information. For some reason I dont get it correct. This is my queryString.

 

 

I am tring to query based on the element attribute.

 

 

<queryString language="xPath"><![CDATA[/Root/Manager/item[/Root/Manager/@name =SD]]]></queryString>

 

 

I am getting the manager name as null

 

 

<field name="Manager" class="java.lang.String">

<fieldDescription><![CDATA[@name]]></fieldDescription>

</field>

 

This is my XML structure

 

 

< Root >

< Manager name='SD' >

< Item >

< ID > 996104 < /ID >

< AccName > ABC Co < /AccName >

< Count > 10 < /Count >

< CID > 7849 < /CID >

< / Item >

< Item >

< ID > 996105 < /ID >

< AccName > NYZ Co < /AccName >

< Count > 14 < /Count >

< CID > 7850 < /CID >

< / Item >

< / Manager >

< Manager name="UP" >

< item >

< ID > 046507 < /ID >

< AccName > XYZ Co < /AccName >

< Count > 0 < /Count >

< CID > 8241 < /CID >

< /item >

< /Manager >

< /Root >

 

 

Can some one correct me with the query please?

 

 

Thanks

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...