|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to sort this xml out
All,
Please have a look on the following XML and XSL File. I want to sort all the replies which previousID == a messageID and to group them under an tag called <content> <?xml version="1.0" encoding="UTF-8"?> <Main> <Message> <id>15</id> <parentID>0</parentID> <title>Title</title> </Message> <Message> <id>17</id> <parentID>0</parentID> <title>Second Title</title> </Message> <Reply> <id>16</id> <parentID>15</parentID> <title>first ReplyTitle</title> </Reply> <Reply> <id>18</id> <parentID>15</parentID> <title>Reply SecondTitle</title> </Reply> </Main> I tried grouping them with the "key" tag as described in this list, but of no success cany anyone please letme know how to do this??. I want the output to be as follows: <?xml version="1.0" encoding="UTF-8"?> <Main> <Content> <id>15</id> <parentID>0</parentID> <title>Title</title> <id>16</id> <parentID>15</parentID> <title>first ReplyTitle</title> <id>18</id> <parentID>15</parentID> <title>Reply SecondTitle</title> </Content> <Message> <id>17</id> <parentID>0</parentID> <title>Second Title</title> </Message> </Main> can anyone help me?? Srini _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








