Hi all,

I am trying to use 2.8.0 of the Xerces-C SAX parser to work with Visio XML
files.  I need to pass through parts of the file untouched while doing
special processing on other parts.  The trouble I'm having is that the
parser is translating predefine entities.  The result is that I'm creating
invalid XML for some of those parts that I want to simply pass through.

For example, I'm getting '&' for the & entity.

I've done a lot of looking at the API and Googling.  I've tried setting my
handler as the LexicalHandler and implementing startEntity and endEntity,
but those methods never get called.

Grasping at straws, I've tried
  parser->setFeature(XMLUni::fgXercesDisableDefaultEntityResolution, true);
But it seems to have no effect.

I've traced into IGXMLScanner::scanEntityRef, and from that, I don't see any
option in the parser for it to return the unaltered entity (~ln 3100) (not
that I'm familiar at all with the code):
        if (decl->getIsSpecialChar())
        {
            firstCh = decl->getValue()[0];
            escaped = true;
            return EntityExp_Returned;
        }

I've not yet considered trying Xerces-C version 3.1.1.

Is there a way to have the parser leave the predefined entities
untranslated?

Thanks for your time,
Jeff
--

Reply via email to