Well, I don't know about specifying a *different* dtd, I
only know how to specify that the dtd be read from a local
file.
DOMParser parser;
parser.setValidationScheme( DOMParser::Val_Auto );
parser.setDoNamespaces( false );
parser.setDoSchema( false );
parser.setDoValidation( true );
parser.setValidationSchemaFullChecking( false );
parser.setIncludeIgnorableWhitespace( false );
DOMTreeErrorReporter errReporter;
parser.setErrorHandler( &errReporter );
parser.setCreateEntityReferenceNodes( false );
parser.setToCreateXMLDeclTypeNode( true );
static const char* szMemBufId = "request";
MemBufInputSource* memBufIS = new MemBufInputSource(
(const XMLByte*)szRequest.c_str(),
_tcslen(szRequest.c_str()), szMemBufId, false );
CStdString strPath( CAppPath::GetDir() );
strPath += "NSAPI.dtd";
DOMString dstrPath( strPath.data() );
memBufIS->setSystemId( XMLString::replicate(
dstrPath.rawBuffer() ) );
parser.parse(*memBufIS);
delete memBufIS; // don't need it anymore
I still don't know yet if the call to replicate is going to result in a
memory leak or not.
If anyone has a better suggestion of getting an stl::string into a XMLCh*,
please let me
know...
-Julie
-----Original Message-----
From: Debienne Eric [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 18, 2001 6:37 AM
To: 'Julia Larson'; '[EMAIL PROTECTED]'
Subject: Specify DTD file to verify XML
Hi,
I just saw you mail in xerces mailing list.
I've got the same problem.
I want to specify the DTD file, and force to use the file I specify, even if
the xml file has a line like
<!DOCTYPE myDTD SYSTEM "myDTD.dtd">
I saw some lines c++, but I don't anderstand what they refer to.
Can you explain me what I have to do (or what you've done)
Thanks
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]