TXMLDocumentParseOptions (C++)
Description
The following example uses the ParseOptions property.
Code
void Test_ParseOptions() {
_di_IXMLDocument document = interface_cast<Xmlintf::IXMLDocument>
(new TXMLDocument(NULL));
// Set parse options.
// This should be done before loading (and parsing) the document.
document->ParseOptions = document->ParseOptions + (TParseOptions() << poPreserveWhiteSpace);
// Uncomment the following line to strip white spaces.
//document->ParseOptions = document->ParseOptions - (TParseOptions() << poPreserveWhiteSpace);
const String s = "<CloudType> <Cirrocumulus /> </CloudType>";
document->LoadFromXML(s);
printf("%ls\n", document->XML->Text);
}
Uses
- Xml.XMLDoc.TXMLDocument.ParseOptions ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.LoadFromXML ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.XML ( fr | de | ja )