Merge pull request #1034 from joelmartinez/msdoc-import2
[mono.git] / mcs / class / System.Xml.Linq / Documentation / en / System.Xml.XPath / Extensions.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="Extensions" FullName="System.Xml.XPath.Extensions">
3   <TypeSignature Language="C#" Value="public static class Extensions" />
4   <TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Extensions extends System.Object" />
5   <AssemblyInfo>
6     <AssemblyName>System.Xml.Linq</AssemblyName>
7     <AssemblyVersion>4.0.0.0</AssemblyVersion>
8   </AssemblyInfo>
9   <Base>
10     <BaseTypeName>System.Object</BaseTypeName>
11   </Base>
12   <Interfaces />
13   <Docs>
14     <remarks>
15       <attribution license="cc4" from="Microsoft" modified="false" />
16       <para>There is some performance penalty for using these methods. Using sqltecxlinq queries yields better performance.</para>
17       <para>Although the ordering of returned collections is not specified in the XML XPath Language 1.0 Recommendation, this extension method returns nodes in document order.</para>
18       <para>Note that nodes are returned in document order even when you use a reverse axis, such as preceding-sibling or ancestor-or-self.</para>
19     </remarks>
20     <summary>
21       <attribution license="cc4" from="Microsoft" modified="false" />
22       <para>This class contains the sqltecxlinq extension methods that enable you to evaluate XPath expressions.</para>
23     </summary>
24   </Docs>
25   <Members>
26     <Member MemberName="CreateNavigator">
27       <MemberSignature Language="C#" Value="public static System.Xml.XPath.XPathNavigator CreateNavigator (this System.Xml.Linq.XNode node);" />
28       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Xml.XPath.XPathNavigator CreateNavigator(class System.Xml.Linq.XNode node) cil managed" />
29       <MemberType>Method</MemberType>
30       <AssemblyInfo>
31         <AssemblyVersion>4.0.0.0</AssemblyVersion>
32       </AssemblyInfo>
33       <ReturnValue>
34         <ReturnType>System.Xml.XPath.XPathNavigator</ReturnType>
35       </ReturnValue>
36       <Parameters>
37         <Parameter Name="node" Type="System.Xml.Linq.XNode" RefType="this" />
38       </Parameters>
39       <Docs>
40         <remarks>
41           <attribution license="cc4" from="Microsoft" modified="false" />
42           <para>You cannot edit the XML tree by using the <see cref="T:System.Xml.XPath.XPathNavigator" /> that is returned by this method. The <see cref="P:System.Xml.XPath.XPathNavigator.CanEdit" /> property returns false.</para>
43           <para>You cannot create an <see cref="T:System.Xml.XPath.XPathNavigator" /> for a <see cref="T:System.Xml.Linq.XDocumentType" /> node. Document types do not participate in the XPath data model.</para>
44           <para>Namespace declarations are reported from left to right. In contrast, for <see cref="T:System.Xml.XmlDocument" /> namespaces are reported from right to left. This is conformant behavior because namespace declarations are not ordered in the XPath data model.</para>
45           <para>The method <see cref="M:System.Xml.XPath.XPathNavigator.MoveToId(System.String)" /> is not supported for navigators that are returned by this method.</para>
46           <para>You can use this method to perform an XSLT transformation. You can create an XML tree, create an <see cref="T:System.Xml.XPath.XPathNavigator" /> from the XML tree, create a new document, and create a <see cref="T:System.Xml.XmlWriter" /> that will write into the new document. Then, you can invoke the XSLT transformation, passing the <see cref="T:System.Xml.XPath.XPathNavigator" /> and <see cref="T:System.Xml.XmlWriter" /> to the transform. After the transformation successfully completes, the new XML tree is populated with the results of the transformation.</para>
47           <para>To perform an XSLT transformation, you can use either an <see cref="T:System.Xml.XmlReader" /> or an <see cref="T:System.Xml.XPath.XPathNavigator" />. The two approaches have different performance characteristics. Some transformations will execute faster when using an <see cref="T:System.Xml.XmlReader" />, and others will execute faster when using a <see cref="T:System.Xml.XPath.XPathNavigator" />. If performance is a concern, we recommend that you experiment with each approach to determine which will perform better in your circumstances.</para>
48         </remarks>
49         <summary>
50           <attribution license="cc4" from="Microsoft" modified="false" />
51           <para>Creates an <see cref="T:System.Xml.XPath.XPathNavigator" /> for an <see cref="T:System.Xml.Linq.XNode" />.</para>
52         </summary>
53         <returns>
54           <attribution license="cc4" from="Microsoft" modified="false" />
55           <para>An <see cref="T:System.Xml.XPath.XPathNavigator" /> that can process XPath queries.</para>
56         </returns>
57         <param name="node">
58           <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Xml.Linq.XNode" /> that can process XPath queries.</param>
59       </Docs>
60     </Member>
61     <Member MemberName="CreateNavigator">
62       <MemberSignature Language="C#" Value="public static System.Xml.XPath.XPathNavigator CreateNavigator (this System.Xml.Linq.XNode node, System.Xml.XmlNameTable nameTable);" />
63       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Xml.XPath.XPathNavigator CreateNavigator(class System.Xml.Linq.XNode node, class System.Xml.XmlNameTable nameTable) cil managed" />
64       <MemberType>Method</MemberType>
65       <AssemblyInfo>
66         <AssemblyVersion>4.0.0.0</AssemblyVersion>
67       </AssemblyInfo>
68       <ReturnValue>
69         <ReturnType>System.Xml.XPath.XPathNavigator</ReturnType>
70       </ReturnValue>
71       <Parameters>
72         <Parameter Name="node" Type="System.Xml.Linq.XNode" RefType="this" />
73         <Parameter Name="nameTable" Type="System.Xml.XmlNameTable" />
74       </Parameters>
75       <Docs>
76         <remarks>
77           <attribution license="cc4" from="Microsoft" modified="false" />
78           <para>You cannot edit the XML tree using the <see cref="T:System.Xml.XPath.XPathNavigator" /> that is returned by this method. The <see cref="P:System.Xml.XPath.XPathNavigator.CanEdit" /> property returns false.</para>
79           <para>You cannot create an <see cref="T:System.Xml.XPath.XPathNavigator" /> for a <see cref="T:System.Xml.Linq.XDocumentType" /> node. Document types do not participate in the XPath data model.</para>
80           <para>Namespace declarations are reported from left to right. In contrast, for <see cref="T:System.Xml.XmlDocument" /> namespaces are reported from right to left. This is conformant behavior because namespace declarations are not ordered in the XPath data model.</para>
81           <para>The method <see cref="M:System.Xml.XPath.XPathNavigator.MoveToId(System.String)" /> is not supported for navigators that are returned by this method.</para>
82           <para>If you use an <see cref="T:System.Xml.XmlNameTable" /> with this method to create the <see cref="T:System.Xml.XPath.XPathNavigator" />, you will get better performance when evaluating XPath expressions.</para>
83         </remarks>
84         <summary>
85           <attribution license="cc4" from="Microsoft" modified="false" />
86           <para>Creates an <see cref="T:System.Xml.XPath.XPathNavigator" /> for an <see cref="T:System.Xml.Linq.XNode" />. The <see cref="T:System.Xml.XmlNameTable" /> enables more efficient XPath expression processing.</para>
87         </summary>
88         <returns>
89           <attribution license="cc4" from="Microsoft" modified="false" />
90           <para>An <see cref="T:System.Xml.XPath.XPathNavigator" /> that can process XPath queries.</para>
91         </returns>
92         <param name="node">
93           <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Xml.Linq.XNode" /> that can process an XPath query.</param>
94         <param name="nameTable">
95           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Xml.XmlNameTable" /> to be used by <see cref="T:System.Xml.XPath.XPathNavigator" />.</param>
96       </Docs>
97     </Member>
98     <Member MemberName="XPathEvaluate">
99       <MemberSignature Language="C#" Value="public static object XPathEvaluate (this System.Xml.Linq.XNode node, string expression);" />
100       <MemberSignature Language="ILAsm" Value=".method public static hidebysig object XPathEvaluate(class System.Xml.Linq.XNode node, string expression) cil managed" />
101       <MemberType>Method</MemberType>
102       <AssemblyInfo>
103         <AssemblyVersion>4.0.0.0</AssemblyVersion>
104       </AssemblyInfo>
105       <ReturnValue>
106         <ReturnType>System.Object</ReturnType>
107       </ReturnValue>
108       <Parameters>
109         <Parameter Name="node" Type="System.Xml.Linq.XNode" RefType="this" />
110         <Parameter Name="expression" Type="System.String" />
111       </Parameters>
112       <Docs>
113         <remarks>
114           <attribution license="cc4" from="Microsoft" modified="false" />
115           <para>If the collection is an enumeration of elements or attributes, you can use the Cast operator to get a collection of <see cref="T:System.Xml.Linq.XElement" /> or <see cref="T:System.Xml.Linq.XAttribute" />.</para>
116           <para>Although the ordering of returned collections is not specified in the XML XPath Language 1.0 Recommendation, this extension method returns nodes in document order.</para>
117           <para>Note that nodes are returned in document order even when you use a reverse axis, such as preceding-sibling or ancestor-or-self.</para>
118         </remarks>
119         <summary>
120           <attribution license="cc4" from="Microsoft" modified="false" />
121           <para>Evaluates an XPath expression.</para>
122         </summary>
123         <returns>
124           <attribution license="cc4" from="Microsoft" modified="false" />
125           <para>An object that can contain a bool, a double, a string, or an <see cref="T:System.Collections.Generic.IEnumerable`1" />. </para>
126         </returns>
127         <param name="node">
128           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Xml.Linq.XNode" /> on which to evaluate the XPath expression.</param>
129         <param name="expression">
130           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.String" /> that contains an XPath expression.</param>
131       </Docs>
132     </Member>
133     <Member MemberName="XPathEvaluate">
134       <MemberSignature Language="C#" Value="public static object XPathEvaluate (this System.Xml.Linq.XNode node, string expression, System.Xml.IXmlNamespaceResolver resolver);" />
135       <MemberSignature Language="ILAsm" Value=".method public static hidebysig object XPathEvaluate(class System.Xml.Linq.XNode node, string expression, class System.Xml.IXmlNamespaceResolver resolver) cil managed" />
136       <MemberType>Method</MemberType>
137       <AssemblyInfo>
138         <AssemblyVersion>4.0.0.0</AssemblyVersion>
139       </AssemblyInfo>
140       <ReturnValue>
141         <ReturnType>System.Object</ReturnType>
142       </ReturnValue>
143       <Parameters>
144         <Parameter Name="node" Type="System.Xml.Linq.XNode" RefType="this" />
145         <Parameter Name="expression" Type="System.String" />
146         <Parameter Name="resolver" Type="System.Xml.IXmlNamespaceResolver" />
147       </Parameters>
148       <Docs>
149         <remarks>
150           <attribution license="cc4" from="Microsoft" modified="false" />
151           <para>You can use this method to evaluate XPath expressions that contain namespace prefixes.</para>
152           <para>Although the ordering of returned collections is not specified in the XML XPath Language 1.0 Recommendation, this extension method returns nodes in document order.</para>
153           <para>Note that nodes are returned in document order even when you use a reverse axis, such as preceding-sibling or ancestor-or-self.</para>
154         </remarks>
155         <summary>
156           <attribution license="cc4" from="Microsoft" modified="false" />
157           <para>Evaluates an XPath expression, resolving namespace prefixes using the specified <see cref="T:System.Xml.IXmlNamespaceResolver" />.</para>
158         </summary>
159         <returns>
160           <attribution license="cc4" from="Microsoft" modified="false" />
161           <para>An object that contains the result of evaluating the expression. The object can be a bool, a double, a string, or an <see cref="T:System.Collections.Generic.IEnumerable`1" />.</para>
162         </returns>
163         <param name="node">
164           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Xml.Linq.XNode" /> on which to evaluate the XPath expression.</param>
165         <param name="expression">
166           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.String" /> that contains an XPath expression.</param>
167         <param name="resolver">
168           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Xml.IXmlNamespaceResolver" /> for the namespace prefixes in the XPath expression.</param>
169       </Docs>
170     </Member>
171     <Member MemberName="XPathSelectElement">
172       <MemberSignature Language="C#" Value="public static System.Xml.Linq.XElement XPathSelectElement (this System.Xml.Linq.XNode node, string expression);" />
173       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Xml.Linq.XElement XPathSelectElement(class System.Xml.Linq.XNode node, string expression) cil managed" />
174       <MemberType>Method</MemberType>
175       <AssemblyInfo>
176         <AssemblyVersion>4.0.0.0</AssemblyVersion>
177       </AssemblyInfo>
178       <ReturnValue>
179         <ReturnType>System.Xml.Linq.XElement</ReturnType>
180       </ReturnValue>
181       <Parameters>
182         <Parameter Name="node" Type="System.Xml.Linq.XNode" RefType="this" />
183         <Parameter Name="expression" Type="System.String" />
184       </Parameters>
185       <Docs>
186         <remarks>To be added.</remarks>
187         <summary>
188           <attribution license="cc4" from="Microsoft" modified="false" />
189           <para>Selects an <see cref="T:System.Xml.Linq.XElement" /> using a XPath expression.</para>
190         </summary>
191         <returns>
192           <attribution license="cc4" from="Microsoft" modified="false" />
193           <para>An <see cref="T:System.Xml.Linq.XElement" />, or null.</para>
194         </returns>
195         <param name="node">
196           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Xml.Linq.XNode" /> on which to evaluate the XPath expression.</param>
197         <param name="expression">
198           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.String" /> that contains an XPath expression.</param>
199       </Docs>
200     </Member>
201     <Member MemberName="XPathSelectElement">
202       <MemberSignature Language="C#" Value="public static System.Xml.Linq.XElement XPathSelectElement (this System.Xml.Linq.XNode node, string expression, System.Xml.IXmlNamespaceResolver resolver);" />
203       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Xml.Linq.XElement XPathSelectElement(class System.Xml.Linq.XNode node, string expression, class System.Xml.IXmlNamespaceResolver resolver) cil managed" />
204       <MemberType>Method</MemberType>
205       <AssemblyInfo>
206         <AssemblyVersion>4.0.0.0</AssemblyVersion>
207       </AssemblyInfo>
208       <ReturnValue>
209         <ReturnType>System.Xml.Linq.XElement</ReturnType>
210       </ReturnValue>
211       <Parameters>
212         <Parameter Name="node" Type="System.Xml.Linq.XNode" RefType="this" />
213         <Parameter Name="expression" Type="System.String" />
214         <Parameter Name="resolver" Type="System.Xml.IXmlNamespaceResolver" />
215       </Parameters>
216       <Docs>
217         <remarks>
218           <attribution license="cc4" from="Microsoft" modified="false" />
219           <para>You can use this method to evaluate XPath expressions that contain namespace prefixes.</para>
220         </remarks>
221         <summary>
222           <attribution license="cc4" from="Microsoft" modified="false" />
223           <para>Selects an <see cref="T:System.Xml.Linq.XElement" /> using a XPath expression, resolving namespace prefixes using the specified <see cref="T:System.Xml.IXmlNamespaceResolver" />.</para>
224         </summary>
225         <returns>
226           <attribution license="cc4" from="Microsoft" modified="false" />
227           <para>An <see cref="T:System.Xml.Linq.XElement" />, or null.</para>
228         </returns>
229         <param name="node">
230           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Xml.Linq.XNode" /> on which to evaluate the XPath expression.</param>
231         <param name="expression">
232           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.String" /> that contains an XPath expression.</param>
233         <param name="resolver">
234           <attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Xml.IXmlNamespaceResolver" /> for the namespace prefixes in the XPath expression.</param>
235       </Docs>
236     </Member>
237     <Member MemberName="XPathSelectElements">
238       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;System.Xml.Linq.XElement&gt; XPathSelectElements (this System.Xml.Linq.XNode node, string expression);" />
239       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;class System.Xml.Linq.XElement&gt; XPathSelectElements(class System.Xml.Linq.XNode node, string expression) cil managed" />
240       <MemberType>Method</MemberType>
241       <AssemblyInfo>
242         <AssemblyVersion>4.0.0.0</AssemblyVersion>
243       </AssemblyInfo>
244       <ReturnValue>
245         <ReturnType>System.Collections.Generic.IEnumerable&lt;System.Xml.Linq.XElement&gt;</ReturnType>
246       </ReturnValue>
247       <Parameters>
248         <Parameter Name="node" Type="System.Xml.Linq.XNode" RefType="this" />
249         <Parameter Name="expression" Type="System.String" />
250       </Parameters>
251       <Docs>
252         <remarks>
253           <attribution license="cc4" from="Microsoft" modified="false" />
254           <para>Although the ordering of returned collections is not specified in the XML XPath Language 1.0 Recommendation, this extension method returns nodes in document order.</para>
255           <para>Note that nodes are returned in document order even when you use a reverse axis, such as preceding-sibling or ancestor-or-self.</para>
256         </remarks>
257         <summary>
258           <attribution license="cc4" from="Microsoft" modified="false" />
259           <para>Selects a collection of elements using an XPath expression.</para>
260         </summary>
261         <returns>
262           <attribution license="cc4" from="Microsoft" modified="false" />
263           <para>An <see cref="T:System.Collections.Generic.IEnumerable`1" /> of <see cref="T:System.Xml.Linq.XElement" /> that contains the selected elements.</para>
264         </returns>
265         <param name="node">
266           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Xml.Linq.XNode" /> on which to evaluate the XPath expression.</param>
267         <param name="expression">
268           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.String" /> that contains an XPath expression.</param>
269       </Docs>
270     </Member>
271     <Member MemberName="XPathSelectElements">
272       <MemberSignature Language="C#" Value="public static System.Collections.Generic.IEnumerable&lt;System.Xml.Linq.XElement&gt; XPathSelectElements (this System.Xml.Linq.XNode node, string expression, System.Xml.IXmlNamespaceResolver resolver);" />
273       <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Collections.Generic.IEnumerable`1&lt;class System.Xml.Linq.XElement&gt; XPathSelectElements(class System.Xml.Linq.XNode node, string expression, class System.Xml.IXmlNamespaceResolver resolver) cil managed" />
274       <MemberType>Method</MemberType>
275       <AssemblyInfo>
276         <AssemblyVersion>4.0.0.0</AssemblyVersion>
277       </AssemblyInfo>
278       <ReturnValue>
279         <ReturnType>System.Collections.Generic.IEnumerable&lt;System.Xml.Linq.XElement&gt;</ReturnType>
280       </ReturnValue>
281       <Parameters>
282         <Parameter Name="node" Type="System.Xml.Linq.XNode" RefType="this" />
283         <Parameter Name="expression" Type="System.String" />
284         <Parameter Name="resolver" Type="System.Xml.IXmlNamespaceResolver" />
285       </Parameters>
286       <Docs>
287         <remarks>
288           <attribution license="cc4" from="Microsoft" modified="false" />
289           <para>You can use this method to evaluate XPath expressions that contain namespace prefixes.</para>
290           <para>Although the ordering of returned collections is not specified in the XML XPath Language 1.0 Recommendation, this extension method returns nodes in document order.</para>
291           <para>Note that nodes are returned in document order even when you use a reverse axis, such as preceding-sibling or ancestor-or-self.</para>
292         </remarks>
293         <summary>
294           <attribution license="cc4" from="Microsoft" modified="false" />
295           <para>Selects a collection of elements using an XPath expression, resolving namespace prefixes using the specified <see cref="T:System.Xml.IXmlNamespaceResolver" />.</para>
296         </summary>
297         <returns>
298           <attribution license="cc4" from="Microsoft" modified="false" />
299           <para>An <see cref="T:System.Collections.Generic.IEnumerable`1" /> of <see cref="T:System.Xml.Linq.XElement" /> that contains the selected elements.</para>
300         </returns>
301         <param name="node">
302           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Xml.Linq.XNode" /> on which to evaluate the XPath expression.</param>
303         <param name="expression">
304           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.String" /> that contains an XPath expression.</param>
305         <param name="resolver">
306           <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Xml.IXmlNamespaceResolver" /> for the namespace prefixes in the XPath expression.</param>
307       </Docs>
308     </Member>
309   </Members>
310 </Type>