setExpandEntities is a DOM thing, right? Basically, that just affects *top level* entities. It can't do anything about entities in attributes, because it doesn't know that they are happening. The way the DOM parser expands or not is that the scanner tells it when entity expansions start and stop, so the parser can just not store the interim content (though it always really does get expaned.) I never implemented the logic to call back out from the scanner for those kinds of attributes, because of the overhead it implied, and I don't think it has ever been added. And I'm not sure it would be a good idea. Generally, if you want to avoid expansion in those cases, just escape the actual ampersand:
<sometag attr="&gt; some text" ... /> -------------------------- Dean Roddey The Charmed Quark Controller Charmed Quark Software [EMAIL PROTECTED] http://www.charmedquark.com "If it don't have a control port, don't buy it!" ----- Original Message ----- From: "Joe Marini" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 2:12 PM Subject: setExpandEntityReferences() question > Hello, > > I'm using Xerces to parse a document that has the following attribute > construct in it: > > <sometag attr="> some text" ... /> > > Now, I *don't* want the > to be replaced by a > character, so I call > setExpandEntityReferences(false). However, it still gets expanded into > an > and causes problems down the road. > > Am I doing something wrong or missing something else? > > Thanks, > > Joe Marini > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
