TDOMParseOptions, TDOMParser, TXMLDocument, ... how to set TDOMParser Options?

I am trying to the use the xmlread and xmlwrite units.

I would like to set the DOM Parser options, I can see in 'fpcsrc/2.2.4/packages/fcl-xml/src' they are defined in the class by another class called TDOMParserOptions, but they are read only in the TDOMParser Class?

I tried Googling for example usages for the units, but came up empty for trying to setup options.

Sample code that won't work do to the read only option for the options:

procedure TForm1.Button1Click(Sender: TObject);
begin
 if OpenDialog.Execute then begin
    domOptions := TDOMParseOptions.Create;
    domOptions.ExpandEntities:=true;
    domParser := TDOMParser.Create;
    domParser.Options := domOptions;
    xdoc := TXMLDocument.create;
    domParser.ParseURI(OpenDialog.Filename,xdoc);
 end;
end;
--
LyX: http://www.lyx.org/ OpenOffice: http://www.openoffice.org/
Inkscape: http://www.inkscape.org/ Scribus: http://www.scribus.net/
GIMP: http://www.gimp.org/ PDF: http://www.pdfforge.org/


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to