Connecting Tech Pros Worldwide Help | Site Map

How to process ONIX XML file with dupicate field names?

  #1  
Old October 11th, 2008, 08:55 AM
rotsjke@gmail.com
Guest
 
Posts: n/a
Hi,

i need to process a onix xml file. I use microsoft dom and this works,
except for the fact that there are dupicate field names in this onix
file and while processing this file each one overwrites the previous.
The xml where it goes wrong:
<Title>
<TitleType>01</TitleType>
<TitleText>Er is er een jarig</TitleText>
</Title>
<Title>
<TitleType>05</TitleType>
<TitleText>ER IS ER EEN JARIG</TitleText>
</Title>
<Title>
<TitleType>10</TitleType>
<TitleText>HILHORST*ER IS ER EEN JARIG</TitleText>
</Title>

After parsing, the only line left is the titletype 10 and the
following titletext.

What to do to prevent this?

Thanks!
Rogier
  #2  
Old October 14th, 2008, 04:55 AM
Joe Kesselman
Guest
 
Posts: n/a

re: How to process ONIX XML file with dupicate field names?


rotsjke@gmail.com wrote:
Quote:
i need to process a onix xml file. I use microsoft dom and this works,
except for the fact that there are dupicate field names in this onix
file and while processing this file each one overwrites the previous.
There's a bug in your code. Without seeing that code, it's hard to
answer beyond that. I'm guessing that you're using the set-property
idiom of the Javascript DOM interfaces, which doesn't deal well with
multiple children having the same name, and that you need to switch to a
more explicit create-node/add-node set of operations.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Closed Thread