TXMLDocument xml declaration (C++)
Description
The following example uses these properties: Version, Encoding, and StandAlone.
Code
void Test_Declaration() {
_di_IXMLDocument document = interface_cast<Xmlintf::IXMLDocument>
(new TXMLDocument(NULL));
const String s = "<?xml version=\"1.0\" encoding=\"UTF-16\" \
standalone=\"yes\"?><TestElement>Inner text</TestElement>";
document->LoadFromXML(s);
// Display document version, encoding and stand-alone properties.
printf("Version: %ls\n", document->Version);
printf("Encoding: %ls\n", document->Encoding);
printf("StandAlone: %ls\n", document->StandAlone);
}
Uses
- Xml.XMLDoc.TXMLDocument.LoadFromXML ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.Version ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.Encoding ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.StandAlone ( fr | de | ja )