[fpc-pascal] How to read TDOMNode attributes

Frank Church vfclists at gmail.com
Fri Dec 2 20:30:17 CET 2011


On 2 December 2011 19:09, Mattias Gaertner <nc-gaertnma at netcologne.de>wrote:

> 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
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>

Is there a way of counting the attributes and listing them out if you don't
know what they are in advance, or some kind of iteration which will tell
you when you are on the last item or there are none at all?



-- 
Frank Church

=======================
http://devblog.brahmancreations.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111202/01c37669/attachment.html>


More information about the fpc-pascal mailing list