This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Converting Single XML into multiple XML Documents
- To: xsl-list at mulberrytech dot com
- Subject: Converting Single XML into multiple XML Documents
- From: "sanjeev ramachandra" <sanjeev_scifi at hotmail dot com>
- Date: Tue, 28 Mar 2000 10:24:47 CST
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I have a xml structure which has to be seperated into 2 or more xml
documents.
The original xml structure looks like this,
<FlightAvailability>
<RequestedSegment>
<OriginTravelServiceLocation>
<Code stringValue="Austin"/>
</OriginTravelServiceLocation>
<DestinationTravelServiceLocation>
<Code stringValue="Florida"/>
</DestinationTravelServiceLocation>
</RequestedSegment>
<RequestedSegment>
<OriginTravelServiceLocation>
<Code stringValue="Florida"/>
</OriginTravelServiceLocation>
<DestinationTravelServiceLocation>
<Code stringValue="Austin"/>
</DestinationTravelServiceLocation>
</RequestedSegment>
<SpecialRequests>
<Meals stringValue="Veg"/>
<Seat Preference stringValue="window"/>
</TripConstraints>
</FlightAvailability>
Now, the above request(xml) contains two requests
1. one from Austin to Florida
2. second from Florida to Austin
3. The third child <SpecialRequests> actually, applies to both the trips.
I want the output to be like this,
first, xml structure for Austin to Florida trip including special requests,
like this...
<FlightAvailability>
<RequestedSegment>
<OriginTravelServiceLocation>
<Code stringValue="Austin"/>
</OriginTravelServiceLocation>
<DestinationTravelServiceLocation>
<Code stringValue="Florida"/>
</DestinationTravelServiceLocation>
</RequestedSegment>
<SpecialRequests>
<Meals stringValue="VEG"/>
<Seat Preference stringValue="window"/>
</TripConstraints>
</FlightAvailability>
second, xml structure for Florida to Austin trip including special requests,
like this...
<FlightAvailability>
<RequestedSegment>
<OriginTravelServiceLocation>
<Code stringValue="Florida"/>
</OriginTravelServiceLocation>
<DestinationTravelServiceLocation>
<Code stringValue="Austin"/>
</DestinationTravelServiceLocation>
</RequestedSegment>
<SpecialRequests>
<Meals stringValue="VEG"/>
<Seat Preference stringValue="window"/>
</TripConstraints>
</FlightAvailability>
How do I do this, any help will be really appreciated.
Thanks
Sanjeev
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list