[fpc-pascal] fcl-xml

Michael Van Canneyt michael at freepascal.org
Tue Mar 12 16:52:52 CET 2013



On Tue, 12 Mar 2013, dev.dliw at gmail.com wrote:

>>> Using Xpath I believe would be something like this:
>> I was missing an If:
>>
>> function ElementById(id: string; doc: TXMLDocument): TDOMElement;
>> var
>>    v: TXPathVariable;
>> begin
>> [..]
>> end;
>
> This does indeed work - thank you :)
> It's an acceptable solution for me, as I will need XPath anyway.
>
> Still I think that TDOMDocument.getElementById is better performance-wise -
> and I don't see a reason why it shouldn't work if TDOMDocument is created by
> the XMLParser - even if no definition is given...
>
> Is this worth a feature request / bug on mantis?

Yes.

Michael.



More information about the fpc-pascal mailing list