Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Complex XML transformation in a better way?

From: twang090@-----.---
To: NULL
Date: 3/3/2006 7:01:00 AM
The problem is how to achieve the transformation as below:

The source xml contains tons of repeating structure like below, each
item
node contains a person element and a insurance element that correlate
to the
Person element with the person id.
<Item>
        <Person id="p123" name="someone1">
        <Insurance ref="p123" detail="blabla1">
</item>
<Item>
        <Person id="p123" name="someone1">
        <Insurance ref="p456" detail="blabla2">
</item>
<Item>
        <Person id="p456" name="someone1">
        <Insurance ref="p123" detail="blabla3">
</item>
The goal is to regroup to a structure of 1(Person) to many(Insurance),
like
below
<Item>
        <Person id="p123" name="someone1">
        <Insurance ref="p123" detail="blabla1">
        <Insurance ref="p123" detail="blabla3">
</Item>
My initial idea was to load the source into memory and dissect into
Hashtables so that I could easily regroup. However, since the source
file is
really big (approximate 50M each with 70000 repeating items), obviously
my
way of doing it is too memory consuming. I am frustrated, after a whole
day
sitting quietly and cannot figure out a better way, I would really
appreciate 
any help. 


Thanks in advance



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent