You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Gareth Reakes <ga...@decisionsoft.com> on 2002/07/24 10:50:00 UTC
Re: ignoring DTD
Hi,
do you mean that you do not want to validate the XML against the
DTD? If so then you can tell the parser not to. Take a look at the
MemParse example.
Gareth
On Wed, 24 Jul 2002, loveyalllove wrote:
> Hello, I have a quick question about ignoring DTD during parsing xml files.
>
> I need to create a DOMDocument object, build a document, and then parse it. And I need
> the parser to ignore any DTD completely. I used to do this
>
> class EntityHandler:public EntityResolver
> {
> InputSource* resolveEntity (const XMLCh *const publicId,const XMLCh *const systemId)
> {
> MemBufInputSource *memBufIS;
> memBufIS = new MemBufInputSource((const XMLByte*) " ", 1, "", false );
> return memBufIS;
> }
> };
>
> But now the DOMEntityResolver wants DOMInputSource, which is not supported by
> MemBufInputSource. I am using xerces-c 2.0.0., by the way....
>
> Is there any code I can take a look at, perhaps?
>
> Thank you very much
>
--
Gareth Reakes, Head of Product Development
DecisionSoft Ltd. http://www.decisionsoft.com
Office: +44 (0) 1865 203192
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org