Hi All,
I have a xml file . And I need to remove the header inofrmation and the tralier information from the xml file. I have pasted the sample xml below:
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Generated by Ascential Software Corporation, DataStage - XMLOutput stage - Mon Nov 19 15:49:21 2007
-->
- <xtd:EBO xmlns:xtd="http://service.aaaa.com/GenericSchema" xmlns:esb="http://service.aaaa.com/schemas/ESBHeader" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <esb:ESBHeader>
<esb:EnvironmentName>Development</esb:EnvironmentName>
<esb:VersionNbr>1.0</esb:VersionNbr>
- <esb:BusinessEvent>
<esb:TransactionTypeCode>PurchaseOrderFullRfh</esb:TransactionTypeCode> <esb
escription>Purchase _Order_Refresh</esb
escription>
<esb:Timestamp>2007-11-19 15:49:12</esb:Timestamp>
<esb:TotalRecordCount>34</esb:TotalRecordCount>
<esb:EventID>111</esb:EventID>
</esb:BusinessEvent>
- <esb:SourceSystem>
<esb:ApplicationName>DWA</esb:ApplicationName>
</esb:SourceSystem>
- <esb:RoutingInformation>
- <esb:Type>
<esb:LabelName>Transaction_Type</esb:LabelName>
<esb:RoutingTypeName>Transaction</esb:RoutingTypeName>
<esb:LabelValueText>Purchase_order</esb:LabelValueText>
</esb:Type>
</esb:RoutingInformation>
- <esb
atasetInfo>
<esb
atasetSizeQty>30</esb
atasetSizeQty>
<esb:TotalDatasetCount>2</esb:TotalDatasetCount>
<esb
atasetNbr>1</esb
atasetNbr>
<esb:KeyField2>1</esb:KeyField2>
</esb
atasetInfo>
</esb:ESBHeader>
- <xtd:EBOPayload>
- <xtd
ata>
<![CDATA[
0000082973|0000000004|QP799-MA|HOL 2002|0000000001|01|0000000002|
0000073994|0000000004|KS754-5A|BAS 9999|0000000092|11|0000000093|
0000081982|0000000004|QP799-VA|HOL 2002|0000000001|01|0000000002|
0000082975|0000000004|QP799-YA|HOL 2002|0000000001|01|0000000002|
]]>
</xtd
ata>
</xtd:EBOPayload>
</xtd:EBO>
Bascially I need to remove the lines from header to "<![CDATA[" and the lines line from "]]>" to the end.
Please Advise.
Thanks & Regards,
Kumar66