Deleting a duplicate line
Posted: Thu Sep 20, 2007 12:22 pm
Roman,
Need your help again. Due to a bug in a purchased software package, there is a duplication in the following xml that is causing a failure.
Note how "<Attr name="TotalBlankPagesInsertedInPartition" value="0" />" is repeated within the last three lines of the "<!-- Partition Level Attributes -->" of the following xml.
<Partition>
<Package>
<Document>
<Attr name="CurrentDocumentInStream" value="1" />
<Attr name="CurrentDocumentInPartition" value="1" />
<Attr name="CurrentDocumentInPackage" value="1" />
<Attr name="IsLastDocumentOfPackage" value="true" />
<Attr name="TotalPagesInDocument" value="1" />
<Attr name="TotalRectoPagesInDocument" value="1" />
<Attr name="TotalVersoPagesInDocument" value="0" />
<Attr name="TotalBlankPagesInsertedInDocument" value="0" />
<Attr name="TotalSheetsInDocument" value="1" />
<Attr name="ASSSIGNED_TO" value="000PL3021" />
<Attr name="AUTH_UID" value="PL3021" />
<Attr name="Category" value="GC_FORMS" />
<Attr name="Creator_ID" value="3021" />
<Attr name="Curr_Date" value="June 22, 2007" />
<Attr name="GC_AUTHOR" value="Scott Gunn" />
<Attr name="GC_CLAIM_NO" value="2007-080009" />
<Attr name="InBound_Doc_Type" value="001218" />
<Attr name="Letter" value="Auto Payment Request Form" />
<Attr name="NJM_Random_GUID" value="ED6533A6713B976FA3F0E995B4E95C48" />
<Attr name="OutBound_Doc_Type" value="OUTBND_DOCTYP" />
<Attr name="POLICY_NO" value="F964535" />
<Attr name="Policy_Type" value="Personal Auto" />
<Attr name="PRINTER_ID" value="XP4250" />
</Document>
<!-- Package Level Attributes -->
<Attr name="CurrentPackageInStream" value="1" />
<Attr name="CurrentPackageInPartition" value="1" />
<Attr name="TotalSheetsInPackage" value="1" />
<Attr name="TotalPackageWeight" value="0.0" />
<Attr name="TotalPackageThickness" value="0.0" />
<Attr name="TotalPagesInPackage" value="1" />
<Attr name="TotalRectoPagesInPackage" value="1" />
<Attr name="TotalVersoPagesInPackage" value="0" />
<Attr name="TotalBlankPagesInsertedInPackage" value="0" />
</Package>
<!-- Partition Level Attributes -->
<Attr name="PartitionNO" value="1" />
<Attr name="TotalPagesInPartition" value="1" />
<Attr name="TotalRectoPagesInPartition" value="1" />
<Attr name="TotalVersoPagesInPartition" value="0" />
<Attr name="TotalBlankPagesInsertedInPartition" value="0" />
<Attr name="TotalSheetsInPartition" value="1" />
<Attr name="TotalBlankPagesInsertedInPartition" value="0" />
</Partition>
How do I delete one of the dups while retaining the other and the overall structure of the file?
Thanks much,
Walt
Need your help again. Due to a bug in a purchased software package, there is a duplication in the following xml that is causing a failure.
Note how "<Attr name="TotalBlankPagesInsertedInPartition" value="0" />" is repeated within the last three lines of the "<!-- Partition Level Attributes -->" of the following xml.
<Partition>
<Package>
<Document>
<Attr name="CurrentDocumentInStream" value="1" />
<Attr name="CurrentDocumentInPartition" value="1" />
<Attr name="CurrentDocumentInPackage" value="1" />
<Attr name="IsLastDocumentOfPackage" value="true" />
<Attr name="TotalPagesInDocument" value="1" />
<Attr name="TotalRectoPagesInDocument" value="1" />
<Attr name="TotalVersoPagesInDocument" value="0" />
<Attr name="TotalBlankPagesInsertedInDocument" value="0" />
<Attr name="TotalSheetsInDocument" value="1" />
<Attr name="ASSSIGNED_TO" value="000PL3021" />
<Attr name="AUTH_UID" value="PL3021" />
<Attr name="Category" value="GC_FORMS" />
<Attr name="Creator_ID" value="3021" />
<Attr name="Curr_Date" value="June 22, 2007" />
<Attr name="GC_AUTHOR" value="Scott Gunn" />
<Attr name="GC_CLAIM_NO" value="2007-080009" />
<Attr name="InBound_Doc_Type" value="001218" />
<Attr name="Letter" value="Auto Payment Request Form" />
<Attr name="NJM_Random_GUID" value="ED6533A6713B976FA3F0E995B4E95C48" />
<Attr name="OutBound_Doc_Type" value="OUTBND_DOCTYP" />
<Attr name="POLICY_NO" value="F964535" />
<Attr name="Policy_Type" value="Personal Auto" />
<Attr name="PRINTER_ID" value="XP4250" />
</Document>
<!-- Package Level Attributes -->
<Attr name="CurrentPackageInStream" value="1" />
<Attr name="CurrentPackageInPartition" value="1" />
<Attr name="TotalSheetsInPackage" value="1" />
<Attr name="TotalPackageWeight" value="0.0" />
<Attr name="TotalPackageThickness" value="0.0" />
<Attr name="TotalPagesInPackage" value="1" />
<Attr name="TotalRectoPagesInPackage" value="1" />
<Attr name="TotalVersoPagesInPackage" value="0" />
<Attr name="TotalBlankPagesInsertedInPackage" value="0" />
</Package>
<!-- Partition Level Attributes -->
<Attr name="PartitionNO" value="1" />
<Attr name="TotalPagesInPartition" value="1" />
<Attr name="TotalRectoPagesInPartition" value="1" />
<Attr name="TotalVersoPagesInPartition" value="0" />
<Attr name="TotalBlankPagesInsertedInPartition" value="0" />
<Attr name="TotalSheetsInPartition" value="1" />
<Attr name="TotalBlankPagesInsertedInPartition" value="0" />
</Partition>
How do I delete one of the dups while retaining the other and the overall structure of the file?
Thanks much,
Walt