From christoph.schnier at empolis.com Mon Sep 17 11:12:15 2012 From: christoph.schnier at empolis.com (Christoph Schnier) Date: Mon, 17 Sep 2012 11:12:15 +0200 Subject: [Expat-discuss] Get'ter functions for xml handler(s) Message-ID: Dear all, to enhance the proposed way of handling the "stack" tracking discussed in the "Expats Basics" I've made some local changes to the my expat parser to implement some get'ter functions to retrieve the current start/end element handler from a parser object. This enables my programs to handle easily different start/end handlers and maintain a stack of handlers without maintaining all level information about the document hierarchy. I would like to know if It is possible to add such get'ter function to the standard expat library. Here are my examples of the new functions: XML_StartElementHandler XML_GetStartElementHandler(XML_Parser parser) { return (startElementHandler); } XML_EndElementHandler XML_GetEndElementHandler(XML_Parser parser) { return (endElementHandler); } Kind regards Christoph Schnier From christoph.schnier at empolis.com Thu Sep 20 12:59:27 2012 From: christoph.schnier at empolis.com (Christoph Schnier) Date: Thu, 20 Sep 2012 12:59:27 +0200 Subject: [Expat-discuss] Get'ter functions for xml handler(s) Message-ID: Dear all, to enhance the proposed way of handling the "stack" tracking discussed in the "Expats Basics" I've made some local changes to the my expat parser to implement some get'ter functions to retrieve the current start/end element handler from a parser object. This enables my programs to handle easily different start/end handlers and maintain a stack of handlers without maintaining all level information about the document hierarchy. I would like to know if It is possible to add such get'ter function to the standard expat library. Here are my examples of the new functions: XML_StartElementHandler XML_GetStartElementHandler(XML_Parser parser) { return (startElementHandler); } XML_EndElementHandler XML_GetEndElementHandler(XML_Parser parser) { return (endElementHandler); } Kind regards Christoph Schnier From karl at waclawek.net Thu Sep 20 17:00:38 2012 From: karl at waclawek.net (Karl Waclawek) Date: Thu, 20 Sep 2012 11:00:38 -0400 Subject: [Expat-discuss] Get'ter functions for xml handler(s) In-Reply-To: References: Message-ID: <000a01cd9740$b2f0d080$18d27180$@waclawek.net> Hi Christoph, It would be appreciated if you could supply a standard patch. It should have documentation updates as well, including modifications to Expat Basics" that show how this new API would help. Thanks, Karl -----Original Message----- From: Expat-discuss [mailto:expat-discuss-bounces+karl=waclawek.net at libexpat.org] On Behalf Of Christoph Schnier Sent: September-20-12 6:59 AM To: expat-discuss at libexpat.org Subject: [Expat-discuss] Get'ter functions for xml handler(s) Dear all, to enhance the proposed way of handling the "stack" tracking discussed in the "Expats Basics" I've made some local changes to the my expat parser to implement some get'ter functions to retrieve the current start/end element handler from a parser object. This enables my programs to handle easily different start/end handlers and maintain a stack of handlers without maintaining all level information about the document hierarchy. I would like to know if It is possible to add such get'ter function to the standard expat library. Here are my examples of the new functions: XML_StartElementHandler XML_GetStartElementHandler(XML_Parser parser) { return (startElementHandler); } XML_EndElementHandler XML_GetEndElementHandler(XML_Parser parser) { return (endElementHandler); } Kind regards Christoph Schnier _______________________________________________ Expat-discuss mailing list Expat-discuss at libexpat.org http://mail.libexpat.org/mailman/listinfo/expat-discuss From pria2811 at gmail.com Mon Sep 24 16:41:08 2012 From: pria2811 at gmail.com (priya gautam) Date: Mon, 24 Sep 2012 20:11:08 +0530 Subject: [Expat-discuss] xpath implementation with expat in c Message-ID: Hi, I want to know how to implement xpath to modify xml using expat parser in c . -- With Regards Priya Gautam MCA(Software Engineering) University School of Information Technology GGSIPU From nickmacd at gmail.com Tue Sep 25 13:06:04 2012 From: nickmacd at gmail.com (Nick MacDonald) Date: Tue, 25 Sep 2012 08:06:04 -0300 Subject: [Expat-discuss] xpath implementation with expat in c In-Reply-To: References: Message-ID: > 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.