Read XML with name space activated

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2571 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2012-10-22 13:23:30 +00:00
parent 9a87777833
commit 9d5841e2cd

View File

@ -54,8 +54,21 @@ uses
XMLWrite, XMLRead, xpath; XMLWrite, XMLRead, xpath;
function ReadXMLFile(AStreeam : TStream) : TXMLDocument; function ReadXMLFile(AStreeam : TStream) : TXMLDocument;
var
p : TDOMParser;
s : TXMLInputSource;
begin begin
ReadXMLFile(Result,AStreeam); s := nil;
p := nil;
try
s := TXMLInputSource.Create(AStreeam);
p := TDOMParser.Create();
p.Options.Namespaces := True;
p.Parse(s,Result);
finally
p.Free();
s.Free();
end;
end; end;
function ReadXMLFile(AFileName : string) : TXMLDocument; function ReadXMLFile(AFileName : string) : TXMLDocument;