Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > can expat leave & as it is ?

Reply
Thread Tools

can expat leave & as it is ?

 
 
ajm
Guest
Posts: n/a
 
      03-03-2005
hi,

a simple question perhaps...I am parsing an XML document
with expat (1.95.x) which has content like:

<element>text &amp; more text E</element>

from which expat outputs something along the lines of

<element>text & more text A</element>

i.e., it resolves the entities. there are various things
I am getting expat to do for but one of the things I would
like it not to do is resolve entities, i.e., I would
have liked it to have given me back

<element>text &amp; more text E</element>

unaltered. is there a simple concrete way that expat can
be persuaded to leave entities untouched ? (i tried
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_NEVER)
with XML_DTD set at compile time etc. but to no avail - perhaps
this is the wrong approach anyhow).

regards,
ajm.
 
Reply With Quote
 
 
 
 
Bjoern Hoehrmann
Guest
Posts: n/a
 
      03-03-2005
* ajm wrote in comp.text.xml:
>i.e., it resolves the entities. there are various things
>I am getting expat to do for but one of the things I would
>like it not to do is resolve entities, i.e., I would
>have liked it to have given me back


You could use XML_GetInputContext() and parse the content manually.
--
Björn Höhrmann · (E-Mail Removed) · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What gadget/s can't you currently leave your home without and why ? Steve Computer Information 22 12-07-2008 06:59 PM
Want help on how we convert output to tabular format Using the expat parser (http://expat.sourceforge.net/) i have to parse the following xml file and print it on the screen in tabular format. sharan XML 1 10-26-2007 01:20 PM
Using the expat parser (http://expat.sourceforge.net/) i have to parse the following xml file and print it on the screen in tabular format. Want a c program on that! sharan XML 1 10-26-2007 07:56 AM
Can I make the Python build use an already-installed version of Expat? Steve Juranich Python 2 07-19-2005 04:09 PM
User can leave the page? Gianmaria I. ASP .Net 2 05-24-2004 08:15 AM



Advertisments