Changes

Jump to navigation Jump to search
208 bytes removed ,  16:36, 24 June 2015
|-
| width='120' | '''Signatures'''
|{{Func|fetch:xml|$uri as xs:string|document-node()}}<br/>{{Func|fetch:xml|$uri as xs:string, $options as map(xs:string, item())|document-node()}}
|-
| '''Summary'''
|Fetches the resource referred to by the given {{Code|$uri}} and returns it as an XML document.<br/>In contrast to <code>fn:doc</code>, each function call returns a different document node. As a consequence, document instances created by this function will not be kept in memory until the end of query evaluation.<br/>The {{Code|$options}} argument can be used to change the parsing behavior. Allowed options are all [[Options#Parsing|parsing]] and [[Options#XML Parsing|XML parsing]] options in lower case. Options can be specified either...<br />* as children of an {{Code|<options/>}} element, e.g.<pre class="brush:xml"><options> <chop value='false'/></options></pre>* or as map, which contains all key/value pairs:<pre class="brush:xquery">map { "chop": false() }</pre>
|-
| '''Errors'''
| '''Examples'''
|
* <code><nowiki>fetch:xml("http://en.wikipedia.org", map { 'chop': true()))</nowiki></code> returns an XML representation of the English Wikipedia main HTML pageand chops all whitespace nodes.
|}
Bureaucrats, editor, reviewer, Administrators
13,551

edits

Navigation menu