TXMLDocumentSaveToFile (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following example uses the SaveToFile function.

Code

void Test_SaveToFile() {
	_di_IXMLDocument document;
	_di_IXMLNode node;

	document = interface_cast<Xmlintf::IXMLDocument>(new TXMLDocument(NULL));
	document->Active = true;

	// Define document content.
	node = document->CreateNode("TestElement");
	document->DocumentElement = node;

	document->SaveToFile(destPath);
}

Uses