Back to Adaptive Vision Library website

You are here: Start » Function Reference » Xml » Xml_SelectSingleAttribute_AsBool

Xml_SelectSingleAttribute_AsBool


This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.

Select attribute from the XML tree using XPath request.

Syntax

void avl::Xml_SelectSingleAttribute_AsBool
(
	const avl::XmlNode& inNode,
	const atl::String& inXPath,
	const atl::Optional<bool&> inDefault,
	atl::String& outAttributeName,
	bool& outAttributeValue
)

Parameters

Name Type Default Description
inNode const XmlNode& Source node.
inXPath const String& XPath criteria.
inDefault const Optional<bool&> NIL If no attribute was found default value will be used.
outAttributeName String& Found attribute name.
outAttributeValue bool& Found attribute value as bool.

Description

Filter finds attribute using provided XPath query. Found node's attribute 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. If other character is found default value is returned. If no attribute is found exception is thrown.

See Also