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 2004/07/16 01:04:40 UTC

xml declaration

Hi,

    I'm trying to disable the xml declaration in my document from appearing. Is that doable?


small snippet of what I'm doing

            XMLCh tempStr[100];
            XMLString::transcode("LS", tempStr, 99);
            DOMWriter * theSerializer = ((DOMImplementationLS*)m_impl)->createDOMWriter();

            DOMErrorHandler * myErrorHandler = new DOMPrintErrorHandler();
            theSerializer->setErrorHandler(myErrorHandler);

            XMLFormatTarget *myFormTarget = new MemBufFormatTarget();

            if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
                theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);

            if (theSerializer->canSetFeature(XMLUni::fgXMLDeclString, false))
                theSerializer->setFeature(XMLUni::fgXMLDeclString, false);

            theSerializer->writeNode(myFormTarget, *m_doc);




Regards and thanks,
 
Mark Van Orman
mark@icsaccess.com
 
Should you have further questions, please contact the ICS Customer Care Team:
email: support@icsaccess.com