Can we modify the XML file, like deleting,updating the nodes using SAX parser at run-time?
<p>I am new to xml parsing, can we update or modify like deleting the node of the XML using SAX parser at run-time, and stream the updated data as XML, or transform it to our own format if we require? As the DOM parser does. </p>

<pre><code>dbFactory = DocumentBuilderFactory.newInstance();
            docBuilder = dbFactory.newDocumentBuilder();
            document = docBuilder.parse("src/"+xmlFile);

             tranformerFactory = TransformerFactory.newInstance();
             transformer = tranformerFactory.newTransformer();

             for (int i = 0; i &lt; inputElementsArrayToRemove.length; i++) 
             {
                 element = (Element)document.getElementsByTagName(inputElementsArrayToRemove[i]).item(0);

                 if(element != null)
                 {
                    // Removes the node from the document
                     element.getParentNode().removeChild(element);
                 }
             }

             // Normalize the DOM tree to combine all adjacent nodes
            document.normalize();

            // Here, transforming(Converting) the document source to the another XML file
            Source source = new DOMSource(document);
            Result dest = new StreamResult(new FileOutputStream(new File("src/"+resultXmlFileName)));

            // transform method to write out the DOM as XML data.
            transformer.transform(source, dest);
</code></pre>
