"Murray Cumming" <[EMAIL PROTECTED]> writes:

> I'm trying to use the DOMPrint code to ouput the text of a DOM_Document
> that was constructed entirely in memory by adding nodes. Unlike the
> DOMPrint example, this DOM_Document was never parsed from XML text.
> 
> I find that the declaration text at the start is never written. I mean
> this type of stuff:
> 
> <?xml version='1.0' encoding='ISO-8859-1' ?>
> <!DOCTYPE cacs_configuration SYSTEM "cacs_configuration.dtd">
> 
> I've tried using DOM_Document::createXMLDecl(), and
> DOM_Document::createDocumentType(), but they don't seem to have any
> effect. Can anyone give me any clues?

Murray, 

Are you using DOM_DOMImplementation::getImplementation() ?

This is the interface I use. Pardon the Perl code, but the interface
is the same:

$impl = XML::Xerces::DOM_DOMImplementation::getImplementation();
$dt = $impl->createDocumentType('Foo', '', 'Foo.dtd');
$doc = $impl->createDocument('Foo', 'foo',$dt);

HTH,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to