PBDOM_ELEMENT:
GetAttribute Syntax 1 method
Description
Returns the PBDOM_ATTRIBUTE object for a PBDOM_ELEMENT
object.
Syntax
1 |
<span>pbdom_element_name.</span>GetAttribute(string <span>strName</span>) |
Argument |
Description |
---|---|
pbdom_element_name |
The name of a PBDOM_ELEMENT |
strName |
The name of the PBDOM_ATTRIBUTE |
Return Values
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 |
pbdom_attr = &<br>   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].