You are here: Start » Filter Reference » System » Xml » Xml_SelectSingleAttribute_AsBool
Module: | FoundationLite |
---|
Select attribute from the XML tree using XPath request.
Name | Type | Description | |
---|---|---|---|
![]() |
inNode | XmlNode | Source node. |
![]() |
inXPath | String | XPath criteria. |
![]() |
inDefault | Bool* | If set this value will be returned when no attribute is found or attribute is incorrect. |
![]() |
outAttributeName | String | Found attribute name. |
![]() |
outAttributeValue | Bool | Found attribute value as bool. |
Description
Filter finds attribute using provided XPath query. Found attribute value is converted to Bool type.
Filter checks only first character of selected node's attribute. Characters Y, y, T, t, 1 will be parsed as True value. Value False will be returned if one of characters N, n, F, f, 0 will be found.
In case when attribute value cannot be parsed or attribute is empty a default value is returned if is set. Otherwise an exception is thrown.
In case when attribute is missing and default value is set a default value is returned. Otherwise an exception is thrown.
Remarks
Read more about how to handle XML in Working with XML Trees article.
Complexity Level
This filter is available on Advanced Complexity Level.
Filter Group
This filter is member of Xml_SelectAttributes filter group.
See Also
- Xml_SelectSingleNode – Selects a node from the XML tree using an XPath request.
- Xml_SelectMultipleNodes – Selects nodes from the XML tree using XPath request.