From bharsha at kodiaknetworks.com Mon Sep 19 09:27:59 2011 From: bharsha at kodiaknetworks.com (Harsha Billalli) Date: Mon, 19 Sep 2011 12:57:59 +0530 Subject: [Expat-discuss] Pre-declared entity parsing in Expat Message-ID: <6B3D985D3827D446B2CBAB549B4A56B904376E84@indiaexchange.inovate.inovate.com> Hi, I am trying to parse the attribute values, with pre-defined entites embedded in an attribute as shown. For Ex: - "AT&T" is in the XML markup as "AT&T" But the Expat XML parser is not changing "&" back to "&" automatically when the document is processed. Also it is considering & as word delimiter. All in the end I get "AT" as the parsed string. Basically parser is ignoring characters after & also any special characters (<,>,',"), even though they are escaped (like < > ' "). Does pre-declared entity (inside an attribute value) parsing is supported in Expat? Thanks, Harsha From anirudh.anu01 at gmail.com Tue Sep 20 09:01:00 2011 From: anirudh.anu01 at gmail.com (anirudh nair) Date: Tue, 20 Sep 2011 12:31:00 +0530 Subject: [Expat-discuss] Cross-referencing support Message-ID: Hi all, I have a requirement of reading and writing XML that is highly cross-referenced(within the same XML). So, does Expat support cross referencing. Basically, I want the below explained functionality. From Here to Eternity: Studies in the Future and other Temporal Genres Margaret Doornan The You Decade: A History of Finger Pointing in Post-War America Kelly Griftman Reading between the Lines: The Literature of Waiting Norbert James Kelly Griftman Senior full-time Norbert James Senior full-time So, now if I fetch the node student with Index==1, the node should look like Norbert James Senior full-time From Here to Eternity: Studies in the Future and other Temporal Genres Margaret Doornan Reading between the Lines: The Literature of Waiting Norbert James Does, Expat provide such a functionality. Thanks Anirudh From lee at novomail.net Tue Sep 20 16:51:27 2011 From: lee at novomail.net (Lee Passey) Date: Tue, 20 Sep 2011 08:51:27 -0600 (MDT) Subject: [Expat-discuss] Cross-referencing support In-Reply-To: References: Message-ID: <51069.207.14.148.51.1316530287.squirrel@e.passkeysoft.com> On Tue, September 20, 2011 1:01 am, anirudh nair wrote: > Does, Expat provide such a functionality? No; Expat is an XML parser only, not a DOM builder. When Expat calls your "start element" callback for '' it has already forgotten all about ''. You /can/ use Expat as the parser portion of a larger application that builds a DOM tree (I frequently use Expat in conjunction with DOMCAPI [http://sourceforge.net/projects/domcapi/] to build DOM trees which I can then query and manipulate) but it is up to you to build whatever internal data structures you need to capture the XML data that Expat parses. Having built your own internal data structures, you can then, of course, present them any way you like. Cheers, Lee From benski at winamp.com Fri Sep 23 17:13:53 2011 From: benski at winamp.com (Ben Allison) Date: Fri, 23 Sep 2011 11:13:53 -0400 Subject: [Expat-discuss] Pre-declared entity parsing in Expat In-Reply-To: <6B3D985D3827D446B2CBAB549B4A56B904376E84@indiaexchange.inovate.inovate.com> References: <6B3D985D3827D446B2CBAB549B4A56B904376E84@indiaexchange.inovate.inovate.com> Message-ID: <0502c56c9f1799a21c01c2cb69724647.squirrel@mail.winamp.com> It sounds as if you are not handling the possibility of multiple character callbacks from within the same element > Hi, > > I am trying to parse the attribute values, with pre-defined > entites embedded in an attribute as shown. > > For Ex: - "AT&T" is in the XML markup as "AT&T" > > But the Expat XML parser is not changing "&" back to "&" > automatically when the document is processed. Also it is considering & > as word delimiter. All in the end I get "AT" as the parsed string. > Basically parser is ignoring characters after & also any special > characters (<,>,',"), even though they are escaped (like < > > ' "). > > > > > > Does pre-declared entity (inside an attribute value) parsing is > supported in Expat? > > > > Thanks, > > Harsha > > > > > > _______________________________________________ > Expat-discuss mailing list > Expat-discuss at libexpat.org > http://mail.libexpat.org/mailman/listinfo/expat-discuss >