XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
edel roosterSubject: Merging elements in an xml file
Author: edel rooster
Date: 04 May 2005 06:48 AM
Hi,
I'm running into difficulty figuring out how to merge stuff in an xml file.

I have an xml file that looks something like
<doc_list>
<doc>
<doc_id>001</doc_id>
<term_list>
<term>A</term>
<term_list>
</doc>
<doc>
<doc_id>001</doc_id>
<term_list>
<term>B</term>
<term_list>
</doc>
</doc_list>

I want to merge the docs that have the same doc_id to get this:

<doc_list>
<doc>
<doc_id>001</doc_id>
<term_list>
<term>A</term>
<term>B</term>
<term_list>
</doc>
</doc_list>

Help very much appreciated.

Edel

Posttop
(Deleted User) Subject: Merging elements in an xml file
Author: (Deleted User)
Date: 04 May 2005 08:48 AM
Originally Posted: 04 May 2005 08:49 AM
Hi Edel,
what you want to do is a grouping of the input file: have a look at the thread at http://www.stylusstudio.com/SSDN/default.asp?action=9&read=2949&fid=23 where the same problem is discussed.

Alberto

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.