[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Converting Single XML into multiple XML Documents

Subject: Converting Single XML into multiple XML Documents
From: "sanjeev ramachandra" <sanjeev_scifi@xxxxxxxxxxx>
Date: Tue, 28 Mar 2000 10:24:47 CST
multiple xml request
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.