I have an XML document similar to this:
<Root> <Sub> <Record> <Guid>aslkjflaksjflkasjfkljsd</Guid> </Record> <Record> <Guid>opqiwuerl;kasdlfkjawop</Guid> </Record> </Sub> </Root>
I am replacing an entire
<Record> node based on some criteria. The
<Record> nodes contain a
<Guid> that I can use to identify them (pretend those are valid GUIDs please!).
Knowing the GUID, I am returning that node's XML into a variable for further processing. Downstream, I need to be able to delete that particular node so I that I can
insert the modified version of the node back into the original document.
Is there a way to determine the ordinal, or another way to use a
replace method to remove a node based on an element's value?