TXMLDocumentParseOptions (Delphi)
Description
The following example uses the ParseOptions property.
Code
procedure Test_ParseOptions;
var
LDocument: IXMLDocument;
begin
LDocument := TXMLDocument.Create(nil);
{ Set parse options.
This should be done before loading (and parsing) the document. }
LDocument.ParseOptions := LDocument.ParseOptions + [poPreserveWhiteSpace];
{ Uncomment the following line to strip white spaces. }
//LDocument.ParseOptions := LDocument.ParseOptions - [poPreserveWhiteSpace];
LDocument.LoadFromXML
('<CloudType> <Cirrocumulus /> </CloudType>');
Writeln(LDocument.XML.Text);
end;
Uses
- Xml.XMLDoc.TXMLDocument.ParseOptions ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.LoadFromXML ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.XML ( fr | de | ja )