Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we insert a new node or edit an XML document using SAX
Paser? If yes how?

Answer Posted / g.h

You could say it is not IMpossible. It just depends on how
the parser is used.

Suppose we made a SAX handler which basically outputs XML
that copies the input being parsed. The handler could be
programmed in such a way that it outputs an additional node
at the right moment. It could also make changes in between
input and output.

However, SAX is not really intended for such operations. We
are not really altering the XML document itself either. SAX
merely reads the XMl text and generates events based on the
input. What we do with those events depends on what the SAX
parser is used for.

If new nodes must be inserted, multiple edits made or
content moved around, the natural fit is DOM: the Document
Object Model. It models an XML document entirely in memory
as an object tree, allowing unlimited alterations. If
necessary, this model can then be outputted to a text-based
XML form again.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define the three parts of xsl?

977


Is sql worth learning?

933


What is url what is the use of it?

943


Are rss feeds still used?

899


What is xml format example?

863


Write syntax to serialize class using XML Serializer?

1008


Why xsl won’t replace css?

949


How do I convert an xml file to pdf?

1041


What is difference between xml and xsl?

894


Where can I declare an xml namespace?

1063


How does an rss feed work?

929


Can you open xml in excel?

924


What is xml schema used for?

871


What is mode in xslt?

853


What is application xml?

893