GetName

Description

Obtains the name of the current PBDOM_OBJECT. The returned string depends on the type of DOM Object that is contained within a PBDOM_OBJECT.

DOM Object Type

Return Value

PBDOM_DOCTYPE

"#document"

PBDOM_ELEMENT

The local tag name of the element, without any namespace prefixes.

For example, if the element is: <abc>Value</abc>, then the string returned from GetName is "abc".

Also, if the tag name of the element contains a namespace prefix, the prefix is not included in the returned string.

For example, if the element is:

<MyMusic:CD xmlns:MyMusic=, then the string returned from GetName is "CD".

"http://www.MyMusicDiscs.com"/>

PBDOM_ATTRIBUTE

The local name of the attribute itself, without a namespace.

For example, if the element with the attribute is: <abc ATTRIBUTE_1="My Attribute">, then GetName returns "ATTRIBUTE_1".

If the name of the attribute contains a namespace prefix, then the prefix is not included in the returned string.

For example, if the element with an attribute is: <MyMusic:CD xmlns:MyMusic=, then GetName returns the string "Type".

"http://www.MyMusicDiscs.com" MyMusic:Type="Jazz"/>

PBDOM_CDATA

"#cdata-section"

PBDOM_COMMENT

"#comment"

PBDOM_DOCTYPE

The name that was given to the doctype object itself.

For example, if the DOCTYPE declaration is: <!DOCTYPE d_grid_object >, then GetName returns "d_grid_object".

PBDOM_PROCESSINGINSTRUCTION

The name that was given to the processing instruction itself.

For example, if the processing instruction definition is: <?works document="hello.doc" data="hello.wks" ?>, then GetName returns "works".

PBDOM_TEXT

"#text"


Syntax

pbdom_object_name.GetName()

Argument

Description

pbdom_object_name

The name of the PBDOM_OBJECT


Return value

The following table lists the return values, based on the type of DOM Object contained within the PBDOM_OBJECT:

Throws

EXCEPTION_PBDOM_OBJECT_INVALID_FOR_USE -- If this PBDOM_OBJECT is not a reference to an object derived from PBDOM_OBJECT.

EXCEPTION_MEMORY_ALLOCATION_FAILURE -- Insufficient memory was encountered while executing this method.

Usage

A PBDOM_OBJECT cannot be instantiated directly.

See also

SetName