Xerces Perl - Don't want DOCTYPE

Bob (archive)

Usenet Archive
Joined
Apr 12, 2000
Messages
597
Reaction score
0
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
548,042
Messages
3,104,224
Members
248,132
Latest member
henrywalsh

Latest Threads

Top