GetAttribute Syntax 1
Description
Returns the PBDOM_ATTRIBUTE object for a PBDOM_ELEMENT
object.
Syntax
|
1 |
pbdom_element_name.GetAttribute(string strName) |
|
Argument |
Description |
|---|---|
|
pbdom_element_name |
The name of a PBDOM_ELEMENT object |
|
strName |
The name of the PBDOM_ATTRIBUTE to be |
Return value
PBDOM_ATTRIBUTE. The PBDOM_ATTRIBUTE object matching the name
specified in the method parameter. If no such PBDOM_ATTRIBUTE object
exists, the GetAttribute method returns a value of null.
Throws
EXCEPTION_INVALID_NAME — If the supplied name is a qualified
name that contains a namespace prefix.
Examples
The GetAttribute method is invoked for the following XML
document:
|
1 |
<MyMusic:abc xmlns:MyMusic="http://www.MyMusic_records.com" My_Attr="My MyMusic Attribute">Root Element Data</MyMusic:abc> |
The GetAttribute method is invoked from the following
PowerScript statement:
|
1 2 |
pbdom_attr = & pbdom_doc.GetRootElement().GetAttribute("My_Attr") |
The GetAttribute method returns the PBDOM_ATTRIBUTE object
My_Attr.
Usage
If the PBDOM_ATTRIBUTE name specified in the method parameter is
a qualified name, an exception is thrown. A qualified name appears in
the following form: [namespace_prefix]:[local_name].
See also