Description
The GetAttributeValue method is overloaded:
-
Syntax 1 returns the string value of a PBDOM_ATTRIBUTE object with the specified name.
-
Syntax 2 returns the string value of a PBDOM_ATTRIBUTE object with the specified name, using the prefix and URI of the namespace of the PBDOM_ATTRIBUTE.
-
Syntax 3 returns the string value of a PBDOM_ATTRIBUTE object with the specified name, using the prefix and URI of the namespace of the PBDOM_ATTRIBUTE. Syntax 3 also provides a default string value to return if the attribute does not exist.
-
Syntax 4 returns the string value of a PBDOM_ATTRIBUTE object with the specified name. Syntax 4 also provides a default string value to return if the attribute does not exist.
Syntax
For this syntax |
See |
---|---|
GetAttributeValue(string strAttributeName) |
|
GetAttributeValue(string strAttributeName, string strNamespacePrefix, string strNamespaceUri) |
|
GetAttributeValue(string strAttributeName, string strNamespacePrefix, string strNamespaceUri, string strDefaultValue) |
|
GetAttributeValue(string strAttributeName, string strDefaultValue) |
Description
Returns the string value of the PBDOM_ATTRIBUTE object (within a PBDOM_ELEMENT object) with the specified name and within no namespace.
Syntax
pbdom_element_name.GetAttributeValue(string strAttributeName)
Argument |
Description |
---|---|
pbdom_element_name |
The name of a PBDOM_ELEMENT object |
strAttributeName |
The name of the attribute whose value is to be returned |
Return value
String.
The string value of the PBDOM_ATTRIBUTE object specified in strAttributeName. If no such object exists, the GetAttributeValue method returns null.
Usage
If the text value of the PBDOM_ATTRIBUTE object is empty, the GetAttributeValue method returns an empty string.
See also
Description
Returns the string value of the PBDOM_ATTRIBUTE object (within a PBDOM_ELEMENT object) with the specified name and within the specified namespace.
Syntax
pbdom_element_name.GetAttributeValue( string strAttributeName, string strNamespacePrefix, string strNamespaceUri)
Argument |
Description |
---|---|
pbdom_element_name |
The name of a PBDOM_ELEMENT object |
strAttributeName |
The name of the attribute whose value is to be returned |
strNamespacePrefix |
The prefix of the namespace of the PBDOM_ATTRIBUTE whose value is to be returned |
strNamespaceUri |
The URI of the namespace of the PBDOM_ATTRIBUTE whose value is to be returned |
Return value
String.
The string value of the PBDOM_ATTRIBUTE object specified in strAttributeName. If no such object exists, the GetAttributeValue method returns an empty string.
Throws
EXCEPTION_INVALID_ARGUMENT -- If any of the input arguments is invalid, for example, null.
EXCEPTION_MEMORY_ALLOCATION_FAILURE -- If there was any memory allocation failure during the execution of this method.
EXCEPTION_INVALID_NAME -- If the input attribute name or namespace prefix or namespace URI is invalid.
See also
Description
Returns the string value of the PBDOM_ATTRIBUTE object (within a PBDOM_ELEMENT object) with the specified name and within the specified namespace. If no such PBDOM_ATTRIBUTE exists, the default value is returned.
Syntax
pbdom_element_name.GetAttributeValue( string strAttributeName, string strNamespacePrefix, string strNamespaceUri, string strDefaultValue)
Argument |
Description |
---|---|
pbdom_element_name |
The name of a PBDOM_ELEMENT object |
strAttributeName |
The name of the attribute whose value is to be returned |
strNamespacePrefix |
The prefix of the namespace of the PBDOM_ATTRIBUTE whose value is to be returned |
strNamespaceUri |
The URI of the namespace of the PBDOM_ATTRIBUTE whose value is to be returned |
strDefaultValue |
Default string value to return if the attribute does not exist |
Return value
String.
The string value of the PBDOM_ATTRIBUTE object specified in strAttributeName. If no such object exists, the GetAttributeValue method returns the string provided in strDefaultValue.
Throws
EXCEPTION_INVALID_ARGUMENT -- If any of the input arguments is invalid, for example, null.
EXCEPTION_MEMORY_ALLOCATION_FAILURE -- If there was any memory allocation failure during the execution of this method.
EXCEPTION_INVALID_NAME -- If the input attribute name or namespace prefix or namespace URI is invalid.
See also
Description
Returns the string value of the PBDOM_ATTRIBUTE object (within a PBDOM_ELEMENT object) with the specified name. If no such PBDOM_ATTRIBUTE exists, the default value is returned.
Syntax
pbdom_element_name.GetAttributeValue(string strAttributeName, string strDefaultValue)
Argument |
Description |
---|---|
pbdom_element_name |
The name of a PBDOM_ELEMENT object |
strAttributeName |
The name of the attribute whose value is to be returned |
strDefaultValue |
Default string value to return if the attribute does not exist |
Return value
String.
The string value of the PBDOM_ATTRIBUTE object specified in strAttributeName. If no such object exists, the GetAttributeValue method returns the string provided in strDefaultValue.
See also