Hi,
This is my input XML.
` <?xml version="1.0" encoding="UTF-8"?>
<queryResponse>
<result>
<done>true</done>
<queryLocator xsi:nil="true" />
<records xsi:type="sf:OpportunityLineItem">
<sf:Id>00kS0000005RwheIAC</sf:Id>
<sf:SAP_QuoteItemNumber__c>000001</sf:SAP_QuoteItemNumber__c>
</records>
<records xsi:type="sf:OpportunityLineItem">
<sf:Id>00kS0000005RwhfIA </sf:Id>
<sf:SAP_QuoteItemNumber__c>000002</sf:SAP_QuoteItemNumber__c>
</records>
<records xsi:type="sf:OpportunityLineItem">
<sf:Id>00kS0000005RwhgIAC</sf:Id>
<sf:SAP_QuoteItemNumber__c>000003</sf:SAP_QuoteItemNumber__c>
</records>
<records xsi:type="sf:OpportunityLineItem">
<sf:Id>00kS0000005RwhhIAC</sf:Id>
<sf:SAP_QuoteItemNumber__c>000004</sf:SAP_QuoteItemNumber__c>
</records>
<records xsi:type="sf:OpportunityLineItem">
<sf:Id>00kS0000005RwhiIAC</sf:Id>
<sf:SAP_QuoteItemNumber__c>000005</sf:SAP_QuoteItemNumber__c>
</records>
<records xsi:type="sf:OpportunityLineItem">
<sf:Id>00kS0000005RwhjIAC</sf:Id>
<sf:SAP_QuoteItemNumber__c>000006</sf:SAP_QuoteItemNumber__c>
</records>
<size>6</size>
</result>
</queryResponse>`
I have to read this XML and split into 6 XMLper records.
so output should look like
1st XML
`
<?xml version="1.0" encoding="UTF-8"?>
<records xsi:type="sf:OpportunityLineItem">
<sf:Id>00kS0000005RwheIAC</sf:Id> <sf:SAP_QuoteItemNumber__c>000001</sf:SAP_QuoteItemNumber__c>
</records>`
2nd xml
` <?xml version="1.0" encoding="UTF-8"?>
<records xsi:type="sf:OpportunityLineItem">
<sf:Id> 00kS0000005RwhfIAC</sf:Id> <sf:SAP_QuoteItemNumber__c>000002</sf:SAP_QuoteItemNumber__c>
</records>`
3rd XML
` <?xml version="1.0" encoding="UTF-8"?>
<records xsi:type="sf:OpportunityLineItem">
<sf:Id>00kS0000005RwhgIAC</sf:Id>
<sf:SAP_QuoteItemNumber__c>000003</sf:SAP_QuoteItemNumber__c>
</records>`
.....
....
so on upto 6th xml.
Please help , how to get it.