thanks for the response Michael. But my application receives this XML document from another application, unfortunately the DTD is not available.
could there be a way such that the parser would avoid resolving these entities altogether? I tried to make it a non-validating parser saxParser->setFeature(XMLUni::fgSAX2CoreValidation, false); but it does not seem to work. Also implementing the EntityResolver did not help. It does not get called to resolve this entity. could somebody please confirm that a DTD is a must if I want to successfully parse an XML document containing entities? Thanks, Anand. -----Original Message----- From: Michael Glavassevich [mailto:[EMAIL PROTECTED] Sent: Sunday, September 21, 2003 11:41 PM To: [EMAIL PROTECTED] Subject: Re: please help: Internal entity resolution. Hi Anand, If you make a reference to an entity (such as nbsp) in your document it needs to be declared in your DTD with an entity declaration [1]. The only entities that you do not have to declare are the predefined entities [2]: lt, gt, amp, quot, and apos. These are the only entities that the parser will recognize without declarations. [1] http://www.w3.org/TR/REC-xml#sec-entity-decl [2] http://www.w3.org/TR/REC-xml#sec-predefined-ent On Sun, 21 Sep 2003, Tarkus, Anand (LNG-DAY) wrote: > The input XML document to SAX2 Xerces parser contains: > > <doc> > <data> > some application data > </data> > </doc> > > parsing this document generates a fatal error: Entity 'nbsp' was not found > > is there a way to resolve this error? > > Thanks, > Anand. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -------------------- Michael Glavassevich [EMAIL PROTECTED] --------------------------------------------------------------------- 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]
