TXMLDocumentLoadFromXML (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following example uses the LoadFromXML function.

Code

void Test_LoadFromXML() {
	_di_IXMLDocument document;

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

	UnicodeString s = "<TestElement>Inner text.</TestElement>";
	document->LoadFromXML(s);

	// Should display "TestElement".
	printf("%ls\n", document->DocumentElement->LocalName);
}

Uses