I have an xml
<XML>
<Client xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.34.00" ></Client>
</XML>
How to remove all the attributes in the Client tag in Java.
I used earlier
Element element = (Element) doc.getElementsByTagName("Client").item(0);
element.removeAttribute("Version");
element.removeAttribute("xmlns:xsi");
The Version attribute was removed from the Client tag. But xmlns:xsi attribute was NOT removed.
Does anybody faced any similar issue or know how to approach this problem.