> > 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? d.l.i.w _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal