HasAttributes

Description

Indicates whether a PBDOM_ELEMENT object has one or more attributes.

Syntax

pbdom_element_name.HasAttributes()

Argument

Description

pbdom_element_name

The name of a PBDOM_ELEMENT object


Return value

Boolean.

Returns true if this PBDOM_ELEMENT object has at least one attribute and false if this PBDOM_ELEMENT object has no attributes.

Examples

In the following document fragment, only the element site has an attribute (href):

<books>
   <title>Inside Wizardry</title>
   <author>Ron Potter</author>
   <site href="http://www.mybooks.com/press"/>
</books>

If the PBDOM_ELEMENT object pbdom_elem_site represents the element site, the following call returns true:

pbdom_elem_site.HasAttributes()

See also

GetAttribute

GetAttributes

GetAttributeValue

SetAttribute

SetAttributes