Re: xpath implementation with expat in c
Nick MacDonald <[email protected]> Tue, 25 Sep 2012 08:06:04 -0300
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <CAGu-nuksDjRDWFcbV8r5DnJZ2sMPxEhrUVf+CCosJEi66QmHog@mail.gmail.com> |
> 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.