TXMLDocumentSaveToStream (C++)
Description
The following example uses the SaveToStream function.
Code
void Test_SaveToStream() {
_di_IXMLDocument document;
TFileStream *stream;
_di_IXMLNode node;
document = interface_cast<Xmlintf::IXMLDocument>(new TXMLDocument(NULL));
document->Active = true;
// Define document content.
node = document->CreateNode("TestElement");
document->DocumentElement = node;
stream = new TFileStream(destPath, fmCreate);
document->SaveToStream(stream);
delete stream;
}
Uses
- Xml.XMLDoc.TXMLDocument.Active ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.CreateNode ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.SaveToStream ( fr | de | ja )