<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="extensibility" page="converting-args.net"
               subpage="converting-node.net"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Converting Nodes and Sequences of Nodes</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Converting Nodes and Sequences of Nodes"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Converting Nodes and Sequences of Nodes</h1>
      <p>If the expected type is a generic collection type, or an array of the Saxon class <a class="bodylink" href="../../javadoc/net/sf/saxon/om/NodeInfo.html"><code>NodeInfo</code></a>, or a
<code>Value</code> or <a class="bodylink" href="../../javadoc/net/sf/saxon/om/SequenceIterator.html"><code>SequenceIterator</code></a>, Saxon will pass the nodes supplied in the call in their native
Saxon representation.</p>
      <p>Saxon also recognizes <code>System.Xml.Node</code> and its subtypes. However, calling a method that expects an instance
if <code>System.Xml.Node</code> will only work if the actual node supplied as the argument value is a Saxon-wrapped DOM node,
that is (a) the input to the stylesheet or query must be supplied in the form of a wrapped DOM, and (b) the external function
must be called supplying a node obtained from the input document, not some node in a temporary tree created in the course of
stylesheet or query processing.</p>
      <p>If an external function returns an <code>System.Xml.Node</code> then it will be wrapped as a Saxon node. This may be
expensive if it is done a lot, since each such node will acquire its own document wrapper.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="converting-wrapped-dotnet.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>