[xmljs-users] Re-ordering XML data...
Brought to you by:
djoham,
witchhunter
From: Eljon G. <eg...@re...> - 2005-02-04 22:25:27
|
Hi, This is my last hurdle to overcome (I think) in using XML and the xmlJS lib= rary. I use this technology to allow users to control the layout (order, a= ctive/inactive, labeling) of pages in our application. However the orderin= g is based on an <orderNumber> element I created by it does not change the = "position" of the <section> in the XML file. My question is there a way to= re-order elements? I can only display the elements by using the XPath pos= ition() function. Here is the way it works now and the desired result: How it looks now: <section> <id>1</id> <name>My Section</name> <orderNumber>02</orderNumber> <active>Yes</active> <locked>Yes</locked> </section> <section> <id>2</id> <name>My Other Section</name> <orderNumber>01</orderNumber> <active>Yes</active> <locked>Yes</locked> </section> The desired results: <section> <id>2</id> <name>My Other Section</name> <orderNumber>01</orderNumber> <active>Yes</active> <locked>Yes</locked> </section> <section> <id>1</id> <name>My Section</name> <orderNumber>02</orderNumber> <active>Yes</active> <locked>Yes</locked> </section> Thanks. Eljon Greene CE Software Engineer 877.394.5644 \\ main 904.567.2127 \\ direct eg...@re... www.recruitmax.com |