[Expat-discuss] xpath implementation with expat in c

Nick MacDonald nickmacd at gmail.com
Tue Sep 25 13:06:04 CEST 2012


> I want to know how to implement xpath to modify xml using expat parser in c

I am not personally familiar with XPath, however, I did look at the
W3C documentation on it, and in the section 5 on Data Model it states
"XPath operates on an XML document as a tree."  This being the case,
then eXpat is not your optimal choice as it does not explicitly build
a tree of the XML file...  this sounds better suited to a DOM based
parser because it explicitly builds a tree to represent the XML
document... this is the difference between a SAX XML parser like eXpat
and DOM based parser.

Having said that, you could turn eXpat into a DOM based parser by
adding a bunch of code to it to build and manipulate a tree... but
doing so would turn eXpat from a SAX based parser into a DOM based
parser.  This type of development is likely not suited for discussion
on the eXpat mailing list.


More information about the Expat-discuss mailing list