Sergei Gorelkin wrote:
Michael Joyner ᏩᏯ пишет:
TDOMParseOptions, TDOMParser, TXMLDocument, ... how to set TDOMParser Options?
has one available. Just create a TDOMParser and set its options like this:

domParser := TDOMParser.Create;
domParser.Options.ExpandEntities := True;

See e.g. the "Validating a document" example in http://wiki.freepascal.org/XML_Tutorial
Sample code that does now work:

procedure TForm1.Button1Click(Sender: TObject);
begin
 if OpenDialog.Execute then begin
    domParser := TDOMParser.Create;
    domParser.Options.ExpandEntities:=True;
    domParser.Options.PreserveWhitespace:=False;
    domParser.Options.ResolveExternals:=True;
    domParser.Options.Namespaces:=True;
    domParser.Options.CDSectionsAsText:=False;
    domParser.ParseURI(FileNameToURI(OpenDialog.Filename),xdoc);
 end;
end;

Is there any way to have the domParser process <import> tags ?


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to