Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Sort xml and output xml

From: "Jim Andersen" <jba020@----------.--.------->
To: NULL
Date: 12/8/2006 11:41:00 AM

Joe Kesselman wrote:

> Personally, I still think the p.lepin's solution is overcomplicated;

I have yet to fully comprehend it :-)

> Both are reusable. Which one is more reusable -- or teaches you more
> about reuse -- is debatable.

I tend to go with the p.lepin solution. Your solution demands that I 
hard-code the names of the nodes "levelone" and "child".
p.lepins only need the "sort"-attribute to be hardcoded.

After I understand p.lepins solution better, I hope to find out if it will 
work with a more deeper nested XML lilke

<levelone>
<child ID="1" 
sort="5"><names><name>Paul</name><name>Anka</name></names></child>
<child ID="2" sort="1"><name>Adam</name></child>
<child ID="3" sort="2"><name>Will</name></child>
</levelone>

> One of the nice things about asking on a
> newsgroup is that you may get multiple solutions, as here, in which
> case you can pick the one that matches your own needs... or, if you
> don't yet know your needs, you'll at least be exposed to the fact
> that multiple valid answers exist.
>
> Have fun.

Thanks. To both of you. For guiding me from wet feet, to knee-deep :-)

/jim 




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