can expat leave & as it is ?

Discussion in 'XML' started by ajm, Mar 3, 2005.

  1. ajm

    ajm Guest

    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.
     
    ajm, Mar 3, 2005
    #1
    1. Advertising

  2. * 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 · mailto: · 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/
     
    Bjoern Hoehrmann, Mar 3, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gianmaria I.

    User can leave the page?

    Gianmaria I., May 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    346
    Gianmaria I.
    May 24, 2004
  2. Sammy
    Replies:
    12
    Views:
    1,252
    Richard Tobin
    May 6, 2005
  3. sharan
    Replies:
    1
    Views:
    731
    Pavel Lepin
    Oct 26, 2007
  4. nnguyen
    Replies:
    3
    Views:
    470
    nnguyen
    Dec 11, 2009
  5. UJ
    Replies:
    1
    Views:
    139
Loading...

Share This Page