selectBool. XPath search for a Boolean value

^node.selectBool[XPath-query]

This method returns result of
XPath-query in the scope of specified node, if it is a Boolean value. If resulted value is not a Boolean, method returns exception of type parser.runtime.

Before using prefixes of name spaces in the
query one must define them, see $xdoc.search-namespaces.

Example
$d[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
<t attr="
hello" n="123"/>}]
^if(^d.selectBool[/t/@n > 10]){
    /t/@n greater than 10
}{
    not greater
}

Detailed specification of XPath is available at: http://www.w3.org/TR/xpath



Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 01.04.2004