HasChildElements

Description

Indicates whether a PBDOM_ELEMENT object has one or more child PBDOM_ELEMENT objects.

Syntax

pbdom_element_name.HasChildElements()

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 child PBDOM_ELEMENT object and false if this PBDOM_ELEMENT object has no child PBDOM_ELEMENT objects.

Examples

The HasChildElements method is invoked for the books PBDOM_ELEMENT object in the following XML fragment:

<books>
   <title>Inside OLE</title>
   <author>Kraig Brockschmidt</author>
   <site href="http://www.microsoft.com/press"/>
</books>

The books object has three child PBDOM_ELEMENT objects: title, author, and site. The HasChildElements method returns true.

See also

GetChildElement

GetChildElements

HasChildren

IsRootElement

RemoveChildElement

RemoveChildElements