Link to home
Start Free TrialLog in
Avatar of ant84
ant84

asked on

Using SAX to edit an xml file

I am able to parse an xml file, and retrieve data element by element for the program to use, but is it possible using SAX to write back to the xml file?

What I would like to be able to do is add elements to it, or edit attribute values of the elements currently there.  A few tutorials I have read say edit it as a text file, but I'm hoping there is a way with a SAX parser to just insert new elements, and it'll do the rest.  I am using the SAXParserFactory.  Can anyone give me a rough outline of whether its possible?
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ant84
ant84

ASKER

Thanks for the quick reply, thats what a couple of tutorials seemed to suggest but I was surprised there wasn't a better method.  I will sit out a little longer for anyone else, but if not will give you the points.