[fpc-pascal] How to read TDOMNode attributes

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Dec 2 20:09:19 CET 2011


On Fri, 2 Dec 2011 18:59:25 +0000
Frank Church <vfclists at gmail.com> wrote:

> Is there a way of knowning the attribute count of a TDOMNode as well as
> reading the value of an attribute if it exists?

HasAttribute:=(Node is TDOMElement) and
(TDOMElement.hasAttribute('Name')); 

Attribute value:

if Node is TDOMElement then
  Value:=TDOMElement(Node).GetAttribute('Name')
else
  Value:='';


Mattias



More information about the fpc-pascal mailing list