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 John Meyer <jo...@yahoo.com> on 2003/03/12 03:29:43 UTC

What is wrong with this code?

XMLPlatformUtils::Initialize();
DOMImplementation *impl =
DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("core")
);
DOMDocument *doc = impl->createDocument(0,XMLString::transcode("files"),0);
DOMWriter *wri = impl->createDOMWriter();
RECLIST::iterator i;
ARecord rec;
for (i = m_Files.begin(); i!= m_Files.end(); ++i)
{
        rec = *i;
        rec.AppendElement(doc);
}
AnsiString *output = new AnsiString(wri->writeToString(*doc));
fstream file;
file.open("files.xml");
file.write(output->c_str(),output->Length());
file.close();
XMLPlatformUtils::Terminate();

BTW, I know that it fills output with the required document.

_________________________________________
John Meyer
Programmer
ICQ#: 63450423
More ways to contact me: http://wwp.icq.com/63450423
_________________________________________


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