xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Manfred Lotz <manfred.lotz AT arcor.de>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] How to sort elements...?
- Date: Mon, 05 May 2008 09:18:00 +0200
Hi all,
I want to modify an xml document by sorting the children of a specific element.
Assuming I have something like this:
<a>
<b key="xyz"> .... </b>
<b key="sssssyz"> .... </b>
<b key="eyz"> .... </b>
<b key="qyz"> .... </b>
<b key="abc"> .... </b>
</a>
I want to sort the <b> elements according to the key value and write the modified xml document to a file.
I can put the <b> elements in Elements
Elements bElements = doc.getRootElement().getChildElements();
but this gives me iteration only.
How can I do it?
--
Manfred
-
[XOM-interest] How to sort elements...?,
Manfred Lotz, 05/05/2008
-
Re: [XOM-interest] How to sort elements...?,
Adam Constabaris, 05/05/2008
-
Re: [XOM-interest] How to sort elements...?,
Manfred Lotz, 05/05/2008
-
Re: [XOM-interest] How to sort elements...?,
Michael Kay, 05/05/2008
- Re: [XOM-interest] How to sort elements...?, Manfred Lotz, 05/06/2008
-
Re: [XOM-interest] How to sort elements...?,
Michael Kay, 05/05/2008
-
Re: [XOM-interest] How to sort elements...?,
Manfred Lotz, 05/05/2008
-
Re: [XOM-interest] How to sort elements...?,
Adam Constabaris, 05/05/2008
Archive powered by MHonArc 2.6.24.