Parsing with SAX
Hi,
I'm trying to add a node to an existing XML file.
This is my code so far.
try {
DefaultHandler handler = new DefaultHandler();
FileInputStream tofile = new FileInputStream("file.xml");
Element newtopic = (Element)moXmlDocument.createElement(title);
SAXParserFactory fac = SAXParserFactory.newInstance();
SAXParser parser = fac.newSAXParser();
parser.parse(tofile, handler);
But I'm not sure where to go from here? Is there a method with DefaultHandler which will return the root node of the XML file so I can append a new node to it?
Any help is greatly appreciated.

