How to remove an element using SAX parser
Thanks for previous replies,
I am new to parsing concept using java, can anyone guide me how to modify the xml using saxparser. i searched long t开发者_如何学Goime to delete the tag but i dont know how to delete. pls guide me
You can remove an element using this :
SAXReader reader = new SAXReader();
reader.setEncoding(CharEncoding.UTF_8);
Document customXmlDocument = reader.read(inputStream);
// Get the element you want to remove and then pass it to the remove method as so
customXmlDocument.remove(Element)
精彩评论