I have this XML file. Path is C:Temp\Test.xml
<?xml version="1.0" encoding="utf-8"?>
<FilingJob xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Batch SeqNum="1">
<FileRoom>Test</FileRoom>
<DeleteFiles>True</DeleteFiles>
<Document SeqNum="1">
<UserDocNum>1</UserDocNum>
<DocName>CARD DISPUTE PACKET-DEBIT</DocName>
<Cabinet>MEMBER DISPUTES</Cabinet>
<Type>CARD DISPUTE PACKET-DEBIT</Type>
<Institution>149</Institution>
<Indexes>
<Index Name="DOC DATE">08/03/2023</Index>
<Index Name="NAME">Test Test</Index>
<Index Name="CIF">123424446</Index>
<Index Name="BRANCH">2</Index>
</Indexes>
<Pages>
<Page SeqNum="1">253_ATM_-_Unauthorized_CHK_-80.PDF</Page>
</Pages>
</Document>
</Batch>
<Batch SeqNum="2">
<FileRoom>Test</FileRoom>
<DeleteFiles>True</DeleteFiles>
<Document SeqNum="2">
<UserDocNum>2</UserDocNum>
<DocName>CARD DISPUTE PACKET-DEBIT</DocName>
<Cabinet>MEMBER DISPUTES</Cabinet>
<Type>CARD DISPUTE PACKET-DEBIT</Type>
<Institution>149</Institution>
<Indexes>
<Index Name="DOC DATE">08/03/2023</Index>
<Index Name="CIF">54353545346</Index>
<Index Name="BRANCH">2</Index>
</Indexes>
<Pages>
<Page SeqNum="2">253_ATM_-_Unauthorized_CHK_-80.PDF</Page>
</Pages>
</Document>
</Batch>
<Batch SeqNum="3">
<FileRoom>Test</FileRoom>
<DeleteFiles>True</DeleteFiles>
<Document SeqNum="3">
<UserDocNum>3</UserDocNum>
<DocName>CARD DISPUTE PACKET-DEBIT</DocName>
<Cabinet>MEMBER DISPUTES</Cabinet>
<Type>CARD DISPUTE PACKET-DEBIT</Type>
<Institution>149</Institution>
<Indexes>
<Index Name="DOC DATE">08/03/2023</Index>
<Index Name="CIF">20141960000005821</Index>
<Index Name="BRANCH">2</Index>
</Indexes>
<Pages>
<Page SeqNum="3">253_ATM_-_Unauthorized_CHK_-80.PDF</Page>
</Pages>
</Document>
</Batch>
</FilingJob>
I want to remove the whole line that has the "Index Name"= CIF That number between the >123456789< is never going to be the same number. How do I get this to work in PowerShell?
Found a Few Remove Child Items but can't seem to get it to work.