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 Dave Hoffer <DH...@xrite.com> on 2002/11/19 21:58:01 UTC
How can I write a DOMDocument faster?
I am using the following code to write a DOMDocument to disk. It is taking a very long time to write (a 13KB file is taking about 2.5 minutes) and it is driving my hard drive crazy (it is constantly doing something).
I obviously am doing something wrong here, can someone point me in the right direction?
LocalFileFormatTarget* pXMLFormatTarget;
DOMImplementation* pDOMImplementation = DOMImplementationRegistry::getDOMImplementation(L"LS");
if (!pDOMImplementation)
return false;
DOMWriter* pDOMWriter = ((DOMImplementationLS*)pDOMImplementation)->createDOMWriter();
if (!pDOMWriter)
return false;
pXMLFormatTarget = new LocalFileFormatTarget( m_strTargetSpec );
if (!(pDOMWriter->writeNode(pXMLFormatTarget, *pDomDocument)))
return false;
pDOMWriter->release();
-dh
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org