GetChildElement

Description

The GetChildElement method is overloaded:

  • Syntax 1 returns the first child PBDOM_ELEMENT object that matches the name indicated by the method parameter.

  • Syntax 2 returns the first child PBDOM_ELEMENT object that matches the name and namespace indicated by the method parameter.

Syntax

For this syntax

See

GetChildElement(string strElementName)

GetChildElement Syntax 1

GetChildElement(string strElementName, string strNamespacePrefix, string strNamespaceUri)

GetChildElement Syntax 2


GetChildElement Syntax 1

Description

Returns the first child PBDOM_ELEMENT object, matching the name indicated by the method parameter that is contained in the PBDOM_ELEMENT object from which the method is invoked.

Syntax

pbdom_element_name.GetChildElement(string strElementName)

Argument

Description

pbdom_element_name

The name of a PBDOM_ELEMENT object

strElementName

The local name of the child PBDOM_ELEMENT object to be returned


Return value

PBDOM_ELEMENT. The first child PBDOM_ELEMENT object whose name matches the value of the method parameter. If no PBDOM_ELEMENT object exists for the specified name, the GetChildElement method returns a value of null.

See also

GetChildElement Syntax 2

GetChildElements

HasChildElements

HasChildren

IsRootElement

RemoveChildElement

RemoveChildElements

GetChildElement Syntax 2

Description

Returns the first child PBDOM_ELEMENT object, matching the name and namespace indicated by the method parameter contained in the PBDOM_ELEMENT object from which the method is invoked.

Syntax

pbdom_element_name.GetChildElement(string strElementName, string strNamespacePrefix, string strNamespaceUri)

Argument

Description

pbdom_element_name

The name of a PBDOM_ELEMENT object

strElementName

The local name of the child PBDOM_ELEMENT object to be returned

strNamespacePrefix

The prefix of the namespace of the child PBDOM_ELEMENT object to be returned

strNamespaceUri

The URI of the namespace of the child PBDOM_ELEMENT object to be returned


Return value

PBDOM_ELEMENT. The first child PBDOM_ELEMENT object whose name and namespace information match the values of the method parameters. If no PBDOM_ELEMENT object exists for the specified name and namespace information, the GetChildElement method returns a value of null.

Throws

EXCEPTION_INVALID_ARGUMENT -- If any of the input arguments is invalid, for example, null.

EXCEPTION_INVALID_NAME -- If the input Element Name or input namespace prefix or namespace URI is invalid.

See also

GetChildElement Syntax 1

GetChildElements

HasChildElements

HasChildren

IsRootElement

RemoveChildElement

RemoveChildElements