xsl-list
[Top] [All Lists]

Add data from various nodes and files

2005-07-18 03:46:25
Hi All,

I was trying to add data from various nodes from various files, but
failed. So i was wondering whether anyone has any idea/method to do
this. Below is an example of what i am doing

In this example, my input files are File1 and File2 and my output
result is File3
- add 1 from File1/AAA to 2 from File2/AAA to output File3
- add 2 from File1/AAA to 3 from File2/AAA to output File3
- add 2 from File1/BBB to 0 from File2/BBB to output File3
- add 3 from File1/BBB to 0 from File2/BBB to output File3

Each file in File1 and File2 have few hundreds nodes of <moid></moid>
Any help is greatly appreciated. Thanks
 
File 1:                                            
<xml>
<moid> AAA </moid>
    <mt> 1 </mt>
    <mt> 2 </mt>
<moid> BBB </moid>
    <mt> 2 </mt>
    <mt> 3 </mt>
</xml>
 
File 2:
<xml>
<moid> AAA </moid>
    <mt> 2 </mt>
    <mt> 3 </mt>
<moid> BBB </moid>
    <mt> 0 </mt>
    <mt> 0 </mt>
</xml>

File 3:                                            
<xml>
<moid> AAA </moid>
    <mt> 3 </mt>
    <mt> 5 </mt>
<moid> BBB </moid>
    <mt> 2 </mt>
    <mt> 3 </mt>
</xml>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>
  • Add data from various nodes and files, Alvin Ng <=