If you want to create a sort of template document that includes, say, any required elements in the DTD, Xerces provides no convenient method.
If you just want to create an instance document that refers to your DTD and has an xml-stylesheet processing instruction, you'll need to call DOMImplementation::getImplementation() to get an implementation pointer, then use DOMImplementation::createDocumentType() to create a document type that you then pass to DOMImplementation::createDocument(). You should be able to create the processing instruction node using DOMDocument::createProcessingInstruction() and append it with DOMNode::appendChild(). You'll probably want to use DOMDocument::getDocumentElement() to get the document's root element. -----Original Message----- From: Gennady Khokhorin [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 05, 2007 5:53 PM To: [email protected] Subject: newbie question: how to create empty xml from DTD Hello, all. I started shaking Xerces and can not figure out how to create an empty xml from DTD file? Also in addition to .dtd I want to include <?xml-stylesheet node. How I can do it? Thank you for advice. Gennady --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
