Hi all,
I have an XML file which I need to append to other XML file.
example file1:
<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlrepository/AOS/Controlled/AFDS/Schemas/AFDSFlightData_2.xsd">
<Header>
<MessageSentDateTime>2009-07-02T11:25:06Z</MessageSentDateTime>
<MessageSequenceNumber>739497</MessageSequenceNumber>
<MessageType>AFDSFlightData</MessageType>
<SourceSystemID>IDAHO</SourceSystemID>
<DestinationSystemID>FIDS</DestinationSystemID>
</Header>
<Body>
<AFDSFlightData>
<SubscriptionID>134784</SubscriptionID>
<Identification>
<AODBUniqueID>4545964</AODBUniqueID>
<FlightReference>
<CarrierCode>EZY</CarrierCode>
<FlightNumber>8609</FlightNumber>
<ArrivalOrDeparture>D</ArrivalOrDeparture>
<ScheduledDateTime>2009-07-02T12:00:00Z</ScheduledDateTime>
</FlightReference>
</AFDSFlightData>
</Body>
</Envelope>
example file2:
<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlrepository/AOS/Controlled/AFDS/Schemas/AFDSFlightData_2.xsd">
<Header>
<MessageSentDateTime>2009-07-02T11:27:06Z</MessageSentDateTime>
<MessageSequenceNumber>739498</MessageSequenceNumber>
<MessageType>AFDSFlightData</MessageType>
<SourceSystemID>IDAHO</SourceSystemID>
<DestinationSystemID>FIDS</DestinationSystemID>
</Header>
<Body>
<AFDSFlightData>
<SubscriptionID>134785</SubscriptionID>
<Identification>
<AODBUniqueID>4545965</AODBUniqueID>
<FlightReference>
<CarrierCode>BA</CarrierCode>
<FlightNumber>123</FlightNumber>
<ArrivalOrDeparture>A</ArrivalOrDeparture>
<ScheduledDateTime>2009-07-02T13:00:00Z</ScheduledDateTime>
</FlightReference>
</AFDSFlightData>
</Body>
</Envelope>
and then end up with a file like:
<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlrepository/AOS/Controlled/AFDS/Schemas/AFDSFlightData_2.xsd">
<Header>
<MessageSentDateTime>2009-07-02T11:25:06Z</MessageSentDateTime>
<MessageSequenceNumber>739497</MessageSequenceNumber>
<MessageType>AFDSFlightData</MessageType>
<SourceSystemID>IDAHO</SourceSystemID>
<DestinationSystemID>FIDS</DestinationSystemID>
</Header>
<Body>
<AFDSFlightData>
<SubscriptionID>134784</SubscriptionID>
<Identification>
<AODBUniqueID>4545964</AODBUniqueID>
<FlightReference>
<CarrierCode>EZY</CarrierCode>
<FlightNumber>8609</FlightNumber>
<ArrivalOrDeparture>D</ArrivalOrDeparture>
<ScheduledDateTime>2009-07-02T12:00:00Z</ScheduledDateTime>
</FlightReference>
</AFDSFlightData>
</Body>
</Envelope>
<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlrepository/AOS/Controlled/AFDS/Schemas/AFDSFlightData_2.xsd">
<Header>
<MessageSentDateTime>2009-07-02T11:27:06Z</MessageSentDateTime>
<MessageSequenceNumber>739498</MessageSequenceNumber>
<MessageType>AFDSFlightData</MessageType>
<SourceSystemID>IDAHO</SourceSystemID>
<DestinationSystemID>FIDS</DestinationSystemID>
</Header>
<Body>
<AFDSFlightData>
<SubscriptionID>134785</SubscriptionID>
<Identification>
<AODBUniqueID>4545965</AODBUniqueID>
<FlightReference>
<CarrierCode>BA</CarrierCode>
<FlightNumber>123</FlightNumber>
<ArrivalOrDeparture>A</ArrivalOrDeparture>
<ScheduledDateTime>2009-07-02T13:00:00Z</ScheduledDateTime>
</FlightReference>
</AFDSFlightData>
</Body>
</Envelope>
Can this be done, if so could anyone provide some direction.