On Tue, 12 Mar 2013, dev.d...@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.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal