Using Xpath I believe would be something like this: function ElementById(id: string; doc: TXMLDocument): TDOMElement; var v: TXPathVariable; begin result:=nil; try v:=EvaluateXPathExpression('//*[@id=' + QuotedStr(id)+']', doc.DocumentElement);
result:=TDOMElement(v.AsNodeSet[0]); finally FreeAndNil(v); end; end; On Tue, Mar 12, 2013 at 10:42 AM, <dev.d...@gmail.com> wrote: > A little side note to my statement: >> and I don't have a DTD > > In this case the behaviour of the parser is even right... > > W3C: > Note: Attributes with the name "ID" or "id" are not of type ID unless so > defined > ---------------------- > http://stackoverflow.com/questions/3423430/java-xml-dom-how-are-id-attributes-special > > But that's not the solution to my problem... :( > d.l.i.w > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal