Jump to content
We've recently updated our Privacy Statement, available here ×

XML one-to-many structures


2004 IR Help

Recommended Posts

By: John Eric Hamacher - badgerduke

XML one-to-many structures

2005-02-15 09:09

Hello:

 

I am having trouble generating a report that will display one-to-many structures in XML. I am filling a report based on the following XML:

 

<?xml version="1.0"?>

<CD>

<artist>

<name>Hole</name>

<album hidden="false">

<title>Live Through This</title>

<year>1994</year>

<numTracks>12</numTracks>

</album>

</artist>

<artist>

<name>Phish</name>

<album hidden="false">

<title>Billy Breathes</title>

<year>1996</year>

<numTracks>13</numTracks>

</album>

</artist>

<artist>

<name>Stone Temple Pilots</name>

<album hidden="true">

<title>Purple</title>

<year>1993</year>

<numTracks>12</numTracks>

</album>

</artist>

<artist>

<name>Soundgarden</name>

<album hidden="false">

<title>Superunknown</title>

<year>1994</year>

<numTracks>15</numTracks>

</album>

<album hidden="false">

<title>Down on the Upside</title>

<year>1996</year>

<numTracks>16</numTracks>

</album>

</artist>

</CD>

 

 

XPaths:

 

My XML DS Path is: /CD/artist.

Name field: name

Title field: album/title

Year field: album/year

Number of Tracks: album/numTracks

 

The report generates fine except that a record is missing . . . the second Soundgarden album.

 

I assume this is an XPath problem (hopefully). But the XPaths I defined should pick up both the Soundgarden albums, not just the first. PrintRepeatedValues is true for everything. IS it the structure of my XML (name as a sibling to album?).

 

 

 

 

By: gandalfchris - warchrisma

RE: XML one-to-many structures

2005-04-05 02:39

did you tried (duplication of structure) :

 

<artist>

<name>Soundgarden</name>

<album hidden="false">

<title>Superunknown</title>

<year>1994</year>

<numTracks>15</numTracks>

</album>

</artist>

<artist>

<name>Soundgarden</name>

<album hidden="false">

<title>Down on the Upside</title>

<year>1996</year>

<numTracks>16</numTracks>

</album>

</artist>

Link to comment
Share on other sites

  • Replies 0
  • 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...