XML doc update -remove a node
843834Jun 24 2010 — edited Jun 30 2010Hello,
I have faced some problem while updating an xml document. The xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<EmployeeDetailList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schema/EmployeeDetail.xsd">
<Version versionId="2.17" />
<Employee Id="1023">
<FirstNm name="DAVID">
<Salary sal="10000" />
<Account no="00423157" />
</RoutingEvent>
</FirstNm>
</Employee>
<Employee Id="1037" />
</EmployeeDetailList>
Now I need to update this document by deleting the <Employee Id="1023"> tag from each set. It will look like:
<?xml version="1.0" encoding="UTF-8"?>
<EmployeeDetailList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schema/EmployeeDetail.xsd">
<Version versionId="2.17" />
<FirstNm name="DAVID">
<Salary sal="10000" />
<Account no="00423157" />
</RoutingEvent>
</FirstNm>
</EmployeeDetailList>
But I could not find a proper way/method to do so. Please help.
Thanks in advance.