|
|
If i get the following message i can split into multiple messages(Refer 2 xml Message)
1>
<ns0:PurchaseOrders xmlns:ns0="http://BatchProcessing.PurchaseOrderBatch">
<ns1:PurchaseOrder xmlns:ns1="http://BatchProcessing.PurchaseOrder">
<PORefNumber>A1234</PORefNumber>
<PODate>2004-05-02</PODate>
<CustomerName>BPL India</CustomerName>
<POTotal>9000</POTotal>
</ns1:PurchaseOrder>
<ns1:PurchaseOrder xmlns:ns1="http://BatchProcessing.PurchaseOrder">
<PORefNumber>B4321</PORefNumber>
<PODate>2004-05-01</PODate>
<CustomerName>ACE Designers</CustomerName>
<POTotal>2000</POTotal>
</ns1:PurchaseOrder>
</ns0:PurchaseOrders>
2>
<ns0:PurchaseOrder xmlns:ns0="http://BatchProcessing.PurchaseOrder">
<PORefNumber>P1234</PORefNumber>
<PODate>1999-05-31</PODate>
<CustomerName>Shaw Wallace</CustomerName>
<POTotal>8000</POTotal>
</ns0:PurchaseOrder>
If i use a Select [ Select * from Amigos where FOR XML AUTO, ELEMENTS ]
in SQL Adapter i get the following message
<?xml version="1.0" encoding="utf-16" ?>
<AmigosRoot xmlns="http://SQLProjectReceive">
<Amigos>
<ID>1</ID>
<Name>Ashok</Name>
<Native>Raichur</Native>
<Company>Sonata</Company>
<exported>Y</exported>
</Amigos>
<Amigos>
<ID>2</ID>
<Name>Balram</Name>
<Native>Sringeri</Native>
<Company>Cap Gemini</Company>
<exported>N</exported>
</Amigos>
</AmigosRoot>
How to Spilt the Above message into
<Amigos>
<ID>1</ID>
<Name>Ashok</Name>
<Native>Raichur</Native>
<Company>Sonata</Company>
<exported>Y</exported>
</Amigos>
and
<Amigos>
<ID>2</ID>
<Name>Balram</Name>
<Native>Sringeri</Native>
<Company>Cap Gemini</Company>
<exported>N</exported>
</Amigos>
Please help me
|
|