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 Mark Van Orman <ma...@icsaccess.com> on 2003/03/14 05:11:09 UTC

DOMDocumentType

Hi All,
    I couldn't find the Xerces-c user list so I am posting to this list.
    I am trying to include
<!DOCTYPE BLAxml SYSTEM "http://xml.bla.de/2.0/BLAxml.dtd">

into a dom document that I am building. After doing this:

DOMDocumentType * dType = impl->createDocumentType(X("BLAxml"), X(""),
X("http://xml.bla.de/2.0/BLAxml.dtd"));
DOMDocument* doc = impl->createDocument(
                    0,                    // root element namespace URI.
                    X("company"),         // root element name
                    dType);                   // document type object (DTD).


then after further building "doc" i print out my node with:

 DOMWriter * theSerializer =
((DOMImplementationLS*)impl)->createDOMWriter();
 XMLFormatTarget * myFormTarget = new StdOutFormatTarget();
 theSerializer->writeNode(myFormTarget, *doc);



I get this:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE BLAxml>
etc.....

Why isn't Doctype being printed like I want/specified above. Thanks in
advance for any advise.

Thanks

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org