<type>text</type> )
<returnvalue>real</returnvalue>
</para>
<para>
Evaluates the XPath query on the supplied document, and
casts the result to <type>real</type>.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>xpath_bool</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type> )
<returnvalue>boolean</returnvalue>
</para>
<para>
Evaluates the XPath query on the supplied document, and
casts the result to <type>boolean</type>.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>xpath_nodeset</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type>, <parameter>toptag</parameter> <type>text</type>, <parameter>itemtag</parameter> <type>text</type> )
<returnvalue>text</returnvalue>
</para>
<para>
Evaluates the query on the document and wraps the result in XML
tags. If the result is multivalued, the output will look like:
<synopsis>
<toptag>
<itemtag>Value 1 which could be an XML fragment</itemtag>
<itemtag>Value 2....</itemtag>
</toptag>
</synopsis>
If either <parameter>toptag</parameter>
or <parameter>itemtag</parameter> is an empty string, the relevant tag
is omitted.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>xpath_nodeset</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type>, <parameter>itemtag</parameter> <type>text</type> )
<returnvalue>text</returnvalue>
</para>
<para>
Like <function>xpath_nodeset(document, query, toptag, itemtag)</function> but result omits <parameter>toptag</parameter>.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>xpath_nodeset</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type> )
<returnvalue>text</returnvalue>
</para>
<para>
Like <function>xpath_nodeset(document, query, toptag, itemtag)</function> but result omits both tags.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>xpath_list</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type>, <parameter>separator</parameter> <type>text</type> )
<returnvalue>text</returnvalue>
</para>
<para>
Evaluates the query on the document and returns multiple values
separated by the specified separator, for example <literal>Value
1,Value 2,Value 3</literal> if <parameter>separator</parameter>
is <literal>,</literal>.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<function>xpath_list</function> ( <parameter>document</parameter> <type>text</type>, <parameter>query</parameter> <type>text</type> )
<returnvalue>text</returnvalue>
</para>
<para>
This is a wrapper for the above function that uses <literal>,</literal>
as the separator.
</para></entry>
</row>
</tbody>
</tgroup>
</table>
</sect2>
<sect2 id="xml2-xpath-table">
<title><literal>xpath_table</literal></title>
<indexterm>
<primary>xpath_table</primary>
</indexterm>
<synopsis>
xpath_table(text key, text document, text relation, text xpaths, text criteria) returns setof record
</synopsis>
<para>
<function>xpath_table</function> is a table function that evaluates a set of XPath
queries