Xerces Perl - Don't want DOCTYPE

B

Bob

I use Xerces/Perl to create an XML document that will use Schemas
instead of DTDs for validation. When I attempt to create a document
with a docType of null, I get an error.

This works:
$docType = eval{$impl->createDocumentType("none", '', '')};
$doc = eval{$impl->createDocument($nameSpace, 'dfStudy', $docType)};

But then I'm stuck with a line in my XML file "<!DOCTYPE none>"
(which, of course, is garbage)

This does not work:
$doc = eval{$impl->createDocument($nameSpace, 'dfStudy', '')};

The error message is:
No matching function for overloaded 'DOMImplementation_createDocument'
at...

Of course, the easy way to get rid of the DOCTYPE line would be to sed
the output of the DOMWriter, but I'd rather make it clean by not
having it there in the first place. Any ideas?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top