[Servingxml-help] Multiple record types per row in flatfile
Brought to you by:
danielaparker
|
From: Keysers W. <Won...@re...> - 2005-10-21 07:26:53
|
Hi,
=20
I need to parse and transform a flatfile (fixed length) file into XML.
The flatfile contains multiple kinds of records on one single row and =
they all go into separate sections in the XML.
=20
Here is a small example of a person with address data on the same line. =
An important side effect is that a person may have multiple lines in the =
flatfile indicating multiple addresses. (e.g. professional / private / =
...)
=20
FlatFile (Positional):
PersonId PersonName PersonFirstName Street Postcode CityTown
=20
Resulting XML file should look like:
<Example>
<Persons>
<Person>
<PersonId/>
<Name/>
<FirstName/>
</Person>
</Persons>
=20
<PersonAddresses>
<PersonAddress>
<PersonId/>
<Addresses>
<Addres>
<Street/>
<PostCode/>
<CityTown/>
<Addres>
</Addresses>
</PersonAddress>
</PersonAddresses> =20
</Example>
=20
The problem could be solved when multiple recordContent elements could =
be specified for a row, but after reading the online documentation, I =
don't think this is currently possible?
=20
What solution do you propose?
=20
Thanks in advance!
=20
/Wonne=20
|