System.Xml [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 All the dynamic members are not designed to be thread safe. System.Xml.XPath.XPathItem System.ICloneable System.Xml.IXmlNamespaceResolver System.Xml.XPath.IXPathNavigable The class in the namespace is an abstract class which defines a cursor model for navigating and editing XML information items as instances of the XQuery 1.0 and XPath 2.0 Data Model. An object is created from a class that implements the interface such as the and classes. objects created by objects are read-only while objects created by objects can be edited. An object's read-only or editable status is determined using the property of the class. For more information about processing XML data using the XPath data model, see the Process XML Data Using the XPath Data Model topic. Exceptions raised as a result of using the class, such as the class, may contain sensitive information that should not be exposed in untrusted scenarios. Exceptions should be properly handled so that this sensitive information is not exposed in untrusted scenarios. Provides a cursor model for navigating and editing XML data. Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 This constructor is called by derived class constructors to initialize state in this type. Initializes a new instance of the class. Method 2.0.0.0 4.0.0.0 System.Xml.XmlWriter Appending child nodes adds the new nodes to the end of the list of child nodes for the current node. For example, when three child nodes exist for an element, the first appended node becomes the fourth child node. If no child nodes exist, then a new child node is created. The following are important notes to consider when using the method. The new child node is not inserted until the method of the object is called. The method is valid only when the is positioned on the root node or an element node. The method does not affect the position of the . You can write more than one node to the writer. All nodes are appended to the end of the list of child nodes of the current node. Returns an object used to create one or more new child nodes at the end of the list of child nodes of the current node. An object used to create new child nodes at the end of the list of child nodes of the current node. Method 2.0.0.0 4.0.0.0 System.Void Appending a child node adds the new node to the end of the list of child nodes for the current node. For example, when three child nodes exist for an element, the appended node becomes the fourth child node. If no child nodes exist, then a new child node is created. To create a new element node, include all XML syntax in the XML string parameter. The string for a new book node is AppendChild("<book/>"). The string for appending the text "book" to the current node's text node is AppendChild("book"). If the XML string contains multiple nodes, all nodes are added. The following are important notes to consider when using the method. The method is valid only when the is positioned on the root node or an element node. The method does not affect the position of the . Creates a new child node at the end of the list of child nodes of the current node using the XML data string specified. The XML data string for the new child node. Method 2.0.0.0 4.0.0.0 System.Void Appending a child node adds the new node to the end of the list of child nodes for the current node. For example, when three child nodes exist for an element, the appended node becomes the fourth child node. If no child nodes exist, then a new child node is created. The following are important notes to consider when using the method. If the object is positioned over a sequence of XML nodes, all the nodes in the sequence are added. The method is valid only when the is positioned on the root node or an element node. The method does not affect the position of the . Creates a new child node at the end of the list of child nodes of the current node using the XML contents of the object specified. An object positioned on the XML data for the new child node. Method 2.0.0.0 4.0.0.0 System.Void Appending a child node adds the new node to the end of the list of child nodes for the current node. For example, when three child nodes exist for an element, the appended node becomes the fourth child node. If no child nodes exist, then a new child node is created. The following are important notes to consider when using the method. If the object is positioned over a sequence of XML nodes, all the nodes in the sequence are added. The method is valid only when the is positioned on the root node or an element node. The method does not affect the position of the . Creates a new child node at the end of the list of child nodes of the current node using the nodes in the specified. An object positioned on the node to add as the new child node. Method 2.0.0.0 4.0.0.0 System.Void Appending a child node adds the new node to the end of the list of child nodes for the current node. For example, when three child nodes exist for an element node, the appended node becomes the fourth child node. If no child nodes exist, then a new child node is created. Namespace prefix and URI values can be obtained by using the method or the method. For example, the following syntax appends a child element by using the in-scope namespace xmlns:bk=http://www.contoso.com/books: navigator.AppendChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navigator.Prefix), String.Empty) This creates the new child <bk:pages/> element. The following are important notes to consider when using the method. If the namespace prefix specified is null or , then the prefix for the namespace URI of the new element is obtained from the current namespaces in-scope. If there is no namespace prefix assigned to the specified namespace URI at the current scope, then a namespace prefix is automatically generated. The method is valid only when the is positioned on the root node or an element node. The method does not affect the position of the . Creates a new child element node at the end of the list of child nodes of the current node using the namespace prefix, local name and namespace URI specified with the value specified. The namespace prefix of the new child element node (if any). The local name of the new child element node (if any). The namespace URI of the new child element node (if any). and null are equivalent. The value of the new child element node. If or null are passed, an empty element is created. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.String A string that represents the base URI. A networked XML document is comprised of chunks of data, aggregated using various W3C standard inclusion mechanisms, and therefore contains nodes that come from different places. DTD entities are an example of this aggregated data, but it is not limited to DTDs. The property tells you where these nodes originate from. For example, if the XML data is loaded from http://server/mydata.xml, the property returns http://server/mydata.xml. Nodes created using the class have the same as the XML document the was created from. When overridden in a derived class, gets the base URI for the current node. Property 2.0.0.0 4.0.0.0 System.Boolean To be added. The property has different values based on the three different implementations of the interface in the .NET Framework. The values for objects created by each implementation are listed in the following table. Implementation Value false true Gets a value indicating whether the can edit the underlying XML data. Method 2.0.0.0 4.0.0.0 System.Boolean The method verifies that the XML data contained in the conforms to a global type or declaration in the schema or schemas provided in the . The method does not perform infoset augmentation. This means that schema defaults are not applied, text values are not converted to atomic values, and no new type information is associated with information items. Schema xsi:schemaLocation or xsi:noNamespaceSchemaLocation hints in the XML data of are ignored. If the is positioned on a document node, the validation process includes checking of uniqueness and reference constraints (xs:ID, xs:IDREF, xs:key, xs:keyref, and xs:unique). Otherwise, these checks are omitted. If the passed as a parameter is null and the is positioned on an element node, the type information exposed by the property's property is used to check the node's validity. If the passed as a parameter is null and the is positioned on the root node, the property of the document element (that is, the element child of the root node) is used. In both cases if the property of the element's property is null and the passed as a parameter is null, an is thrown because there is no type information to use to perform validation. Verifies that the XML data in the conforms to the XML Schema definition language (XSD) schema provided. true if no schema validation errors occurred; otherwise, false. The containing the schemas used to validate the XML data contained in the . The that receives information about schema validation warnings and errors. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNavigator The method is especially useful in conjunction with the . An is used to iterate over a selected node set, and contains a property which returns an positioned on the context node of the . However, the returned by the property cannot be used to move away from the node set. Instead, you clone the returned and use the cloned navigator to do any additional moves. The cloned is not affected by subsequent changes to the original . When overridden in a derived class, creates a new positioned at the same node as this . A new positioned at the same node as this . Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XmlNodeOrder The following table describes the enumeration. XmlNodeOrder Description The current node of this is before the current node of the supplied . The current node of this is after the current node of the supplied . The two objects are positioned on the same node. The node positions cannot be determined relative to each other in the document order, or null is specified as the parameter. This could occur if the two nodes reside in different trees. The method's behavior is dependent on the the is currently positioned on. When comparing nodes in the XML document, the following rules apply: nodes: These nodes are returned in document order from the source document. nodes: These nodes may be returned in document order and are always before the nodes of the parent element. nodes: These nodes may be returned in document order. They always come after the nodes and before any child nodes of the parent node. For more information about the XPath data model and details about each of the node types, see section 5 of the W3C XML Path Language (XPath) recommendation located at http://www.w3.org/TR/xpath#data-model. This method has no effect on the state of the . Use the method rather than the method when possible. Compares the position of the current with the position of the specified. An value representing the comparative position of the two objects. The to compare against. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathExpression An XPath expression is evaluated to yield one of the following return types: Node Set: an unordered collection of nodes without duplicates Boolean: true or false Number: a floating-point number String: a sequence of UCS characters Expressions that return a node set can be used in the and methods. Expressions that return a Boolean, number, or string can be used in the method. The rules on valid expressions for the method are specific to that method. Compiles a string representing an XPath expression and returns an object. An object representing the XPath expression. A string representing an XPath expression. Method 2.0.0.0 4.0.0.0 System.Void Namespace prefix and URI values can be obtained using the or method. For example, the following syntax creates an attribute by using the in-scope namespace xmlns:bk="http://www.contoso.com/books": editor.CreateAttribute(navigator.Prefix, "attributeName", LookupNamespace(navigator.Prefix), "text") This creates the new attribute <bk:element attributeName="text"/> on the current element. The following are important notes to consider when using the method. If the namespace prefix specified is or null, the prefix for the namespace URI of the new attribute is obtained from the current namespaces in-scope. If there is no namespace prefix assigned to the specified namespace URI at the current scope, a namespace prefix is automatically generated. For example to create a new attribute on an element in the default namespace of the contosoBooks.xml file, (xmlns="http://www.contoso.com/books"), you specify null or for both the namespace prefix and namespace URI parameters. Specifying http://www.contoso.com/books as the namespace URI parameter will cause the method to auto generate a namespace prefix for the new attribute. If the new attribute created is a namespace node which conflicts with a namespace declaration on the element, either because the namespace prefix chosen is used by another namespace declaration at the same scope, or because the prefix chosen is the same as that of the element but is bound to a different namespace URI, an exception is thrown. The method does not affect the position of the . Creates an attribute node on the current element node using the namespace prefix, local name and namespace URI specified with the value specified. The namespace prefix of the new attribute node (if any). The local name of the new attribute node which cannot or null. The namespace URI for the new attribute node (if any). The value of the new attribute node. If or null are passed, an empty attribute node is created. Method 2.0.0.0 4.0.0.0 System.Xml.XmlWriter The following are important notes to consider when using the method. When the is positioned on an element, the new attributes created by the method are placed at the end of the attribute list of the current element. The new attributes are not inserted until the method of the object is called. If the namespace prefix specified is or null, the prefix for the namespace URI of the new attribute is obtained from the current namespaces in-scope. If there is no namespace prefix assigned to the specified namespace URI at the current scope, a namespace prefix is automatically generated. For example to create a new attribute on an element in the default namespace of the contosoBooks.xml file, (xmlns="http://www.contoso.com/books"), you specify null or for both the namespace prefix and namespace URI parameters. Specifying http://www.contoso.com/books as the namespace URI parameter will cause the method to auto generate a namespace prefix for the new attribute. If the new attribute created is a namespace node which conflicts with a namespace declaration on the element, either because the namespace prefix chosen is used by another namespace declaration at the same scope, or because the prefix chosen is the same as that of the element but is bound to a different namespace URI, an exception is thrown. The object returned may only be used to create attributes. Calling other object methods that do not create attributes throws an exception. The method does not affect the position of the . Returns an object used to create new attributes on the current element. An object used to create new attributes on the current element. Method 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNavigator This method is equivalent to the method. Returns a copy of the . An copy of this . Method 2.0.0.0 4.0.0.0 System.Void The method deletes a range of sibling nodes from the current node the is positioned on (inclusive) to the node specified by the parameter (inclusive). The is then positioned on its parent node. Deletes a range of sibling nodes from the current node to the node specified. An positioned on the last sibling node in the range to delete. Method 2.0.0.0 4.0.0.0 System.Void The is positioned on the deleted node's parent node on successful deletion. If the deleted node is a text node which is the content of a simple typed element, the element loses its type information. This means that when positioned on the element the , and properties have the values null, and respectively. Deleted nodes are still accessible to objects positioned over them prior to deletion. However methods that attempt to move away from the deleted sub-tree fail. For example, the and methods always fail when the is positioned over the top most deleted node. This is because the deleted node is no longer connected to the XML document. Similarly the method always fails if the is positioned on the bottom-most deleted node. Deletes the current node and its child nodes. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Object The following C# code converts the Price/text() node to a number, multiplies it by 10, and returns the resulting value. nav.Evaluate("Price/text()*10"); The XPath position() and last() functions, unless used as a predicate in a location step, require a reference to a node set in order to be evaluated. In this case, you must use the overload which takes an as an argument; otherwise, position() and last() return 0. This method has no effect on the state of the . Evaluates the specified XPath expression and returns the typed result. The result of the expression (Boolean, number, string, or node set). This maps to , , , or objects respectively. A string representing an XPath expression that can be evaluated. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Object The following C# code returns a number after converting the Price/text() node to a number and multiplying the value by 10. XPathExpression expr = nav.Compile("Price/text()*10"); nav.Evaluate(expr); The XPath position() and last() functions, unless used as a predicate in a location step, require a reference to a node set in order to be evaluated. In this case, you must use the overload which takes an as an argument; otherwise, position() and last() return 0. This method has no effect on the state of the . Evaluates the and returns the typed result. The result of the expression (Boolean, number, string, or node set). This maps to , , , or objects respectively. An that can be evaluated. Method 2.0.0.0 4.0.0.0 System.Object The following C# code returns a number after converting the Price/text() node to a number and multiplying the value by 10. XPathExpression expr = nav.Compile("Price/text()*10"); nav.Evaluate(expr); The XPath position() and last() functions, unless used as a predicate in a location step, require a reference to a node set in order to be evaluated. In this case, you must use the overload which takes an as an argument; otherwise, position() and last() return 0. This method has no effect on the state of the . Evaluates the specified XPath expression and returns the typed result, using the object specified to resolve namespace prefixes in the XPath expression. The result of the expression (Boolean, number, string, or node set). This maps to , , , or objects respectively. A string representing an XPath expression that can be evaluated. The object used to resolve namespace prefixes in the XPath expression. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Object The expression is evaluated using the node of the as the context node. If is null, the node on which the is currently positioned is used as the context node. The position() and last() functions, unless used as a predicate in a location step, always return 0 under the following conditions: The argument is null. has not been called on the . Because the position() and last() functions work on the current node, you should not use the property to move away from the selected node set. This could invalidate the state of the . This method has no effect on the state of the . Uses the supplied context to evaluate the , and returns the typed result. The result of the expression (Boolean, number, string, or node set). This maps to , , , or objects respectively. An that can be evaluated. An that points to the selected node set that the evaluation is to be performed on. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.String The must be positioned on an element node before calling the method. This method has no effect on the state of the . Gets the value of the attribute with the specified local name and namespace URI. A that contains the value of the specified attribute; if a matching attribute is not found, or if the is not positioned on an element node. The local name of the attribute. The namespace URI of the attribute. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.String Namespaces xml and xmlns always return a value. If is specified as the parameter, the method returns the default xmlns namespace. For a definition of namespace nodes, see section 5.4 of the W3C XML Path Language (XPath) recommendation located at http://www.w3.org/TR/xpath#data-model. This method does not affect the state of the . Returns the value of the namespace node corresponding to the specified local name. A that contains the value of the namespace node; if a matching namespace node is not found, or if the is not positioned on an element node. The local name of the namespace node. Method 2.0.0.0 4.0.0.0 System.Collections.Generic.IDictionary<System.String,System.String> The namespaces returned depends on the value specified. XmlNamespaceScope Value Namespaces Returned All namespaces defined in the scope of the current node. This includes the xmlns:xml namespace, which is always declared implicitly. The order of the namespaces returned is not defined. All namespaces defined in the scope of the current node, excluding the xmlns:xml namespace, which is always declared implicitly. The order of the namespaces returned is not defined. All namespaces that are defined locally at the current node. Returns the in-scope namespaces of the current node. An collection of namespace names keyed by prefix. An value specifying the namespaces to return. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean True if the current node is element and has one or more attributes; Otherwise False. To be added. Gets a value indicating whether the current node has any attributes. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean True if the current node is element and has one or more children; Otherwise False (attribute and namespace nodes don't have "children"). If the is positioned on a node that cannot have child nodes, the property always returns false. The following table lists the child node nodes allowed for each node. XPathNodeType Node Child XPathNodeType Nodes , , or nodes. is equivalent to when using the class and can have the same children as an element. , , , , or nodes. All other nodes Cannot have child nodes. Gets a value indicating whether the current node has any child nodes. Property 2.0.0.0 4.0.0.0 System.String To be added. The and properties are not very efficient. If performance is a priority, it is more efficient to use the node navigation methods of the to get values of child nodes. Gets or sets the markup representing the child nodes of the current node. Method 2.0.0.0 4.0.0.0 System.Xml.XmlWriter The following are important notes to consider when using the method. The new sibling node is not inserted until the method of the object is called. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Returns an object used to create a new sibling node after the currently selected node. An object used to create a new sibling node after the currently selected node. Method 2.0.0.0 4.0.0.0 System.Void To create a new element node, include all XML syntax in the XML string parameter. The string for a new book node is InsertAfter("<book/>"). The string for inserting the text "book" after the current node's text node is InsertAfter("book"). If the XML string contains multiple nodes, all nodes are added. The following are important notes to consider when using the method. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Creates a new sibling node after the currently selected node using the XML string specified. The XML data string for the new sibling node. Method 2.0.0.0 4.0.0.0 System.Void The following are important notes to consider when using the method. If the object is positioned over a sequence of XML nodes, all the nodes in the sequence are added. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Creates a new sibling node after the currently selected node using the XML contents of the object specified. An object positioned on the XML data for the new sibling node. Method 2.0.0.0 4.0.0.0 System.Void The following are important notes to consider when using the method. If the object is positioned over a sequence of XML nodes, all the nodes in the sequence are added. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Creates a new sibling node after the currently selected node using the nodes in the object specified. An object positioned on the node to add as the new sibling node. Method 2.0.0.0 4.0.0.0 System.Xml.XmlWriter The following are important notes to consider when using the method. The new sibling node is not inserted until the method of the object is called. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Returns an object used to create a new sibling node before the currently selected node. An object used to create a new sibling node before the currently selected node. Method 2.0.0.0 4.0.0.0 System.Void To create a new element node, include all XML syntax in the XML string parameter. The string for a new book node is InsertBefore("<book/>"). The string for inserting the text "book" before the current node's text node is InsertBefore("book"). If the XML string contains multiple nodes, all nodes are added. The following are important notes to consider when using the method. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Creates a new sibling node before the currently selected node using the XML string specified. The XML data string for the new sibling node. Method 2.0.0.0 4.0.0.0 System.Void The following are important notes to consider when using the method. If the object is positioned over a sequence of XML nodes, all the nodes in the sequence are added. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Creates a new sibling node before the currently selected node using the XML contents of the object specified. An object positioned on the XML data for the new sibling node. Method 2.0.0.0 4.0.0.0 System.Void The following are important notes to consider when using the method. If the object is positioned over a sequence of XML nodes, all the nodes in the sequence are added. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Creates a new sibling node before the currently selected node using the nodes in the specified. An object positioned on the node to add as the new sibling node. Method 2.0.0.0 4.0.0.0 System.Void Namespace prefix and URI values can be obtained using the or method. For example, the following syntax inserts a sibling element by using the in-scope namespace xmlns:bk="http://www.contoso.com/books": navigator.InsertElementAfter(navigator.Prefix, "pages", LookupNamespaceURI(navigator.Prefix), String.Empty) This creates the new sibling <bk:pages/> element. The following are important notes to consider when using the method. If the namespace prefix specified is null or , then the prefix for the namespace URI of the new element is obtained from the current namespaces in-scope. If there is no namespace prefix assigned to the specified namespace URI at the current scope, then a namespace prefix is automatically generated. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Creates a new sibling element after the current node using the namespace prefix, local name and namespace URI specified, with the value specified. The namespace prefix of the new child element (if any). The local name of the new child element (if any). The namespace URI of the new child element (if any). and null are equivalent. The value of the new child element. If or null are passed, an empty element is created. Method 2.0.0.0 4.0.0.0 System.Void Namespace prefix and URI values can be obtained using the or method. For example, the following syntax inserts a sibling element by using the in-scope namespace xmlns:bk="http://www.contoso.com/books": navigator.InsertElementBefore(navigator.Prefix, "pages", LookupNamespaceURI(navigator.Prefix), String.Empty) This creates the new sibling <bk:pages/> element. The following are important notes to consider when using the method. If the namespace prefix specified is null or , then the prefix for the namespace URI of the new element is obtained from the current namespaces in-scope. If there is no namespace prefix assigned to the specified namespace URI at the current scope, then a namespace prefix is automatically generated. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. The method does not affect the position of the . Creates a new sibling element before the current node using the namespace prefix, local name, and namespace URI specified, with the value specified. The namespace prefix of the new child element (if any). The local name of the new child element (if any). The namespace URI of the new child element (if any). and null are equivalent. The value of the new child element. If or null are passed, an empty element is created. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean An is a descendant of the current if it is positioned on a descendant node of the current . Take, for example, the following XML string: <item><name>widget</name></item> If the current is positioned on the item node, and the specified is positioned on the name node, returns true. This method always returns false under the following conditions: The specified shares the same implementation but points at a different document instance than the current navigator. The specified has a different implementation than the current navigator. Determines whether the specified is a descendant of the current . true if the specified is a descendant of the current ; otherwise, false. The to compare to this . Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean True if the current ndoe is empty tag element; False if the current node is not an element, or an element that has contents, or an element that has explicit close tag. This property enables you to determine the difference between the following different elements. Element IsEmptyElement Value <item num="123"/> true <item num="123">test</item> false <item num="123"></item> false When overridden in a derived class, gets a value indicating whether the current node is an empty element without an end element tag. Property 2.0.0.0 4.0.0.0 System.Boolean To be added. To be added. Gets a value indicating if the current node represents an XPath node. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean The method assumes that the specified shares the same implementation and is points at the same document instance as the current . This method always returns false under the following conditions: The specified shares the same implementation but points at a different document instance than the current . The has a different implementation than the current . When overridden in a derived class, determines whether the current is at the same position as the specified . true if the two objects have the same position; otherwise, false. The to compare to this . Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.String A string that represents the local name or the namespace prefix. The local name returned depends on the of the current node. For example, the local name for the <bk:book> element is book. The following table lists the value returned by the property, based on the of the current node. XPathNodeType Property Value The local name of the element. The local name of the attribute. The prefix associated with the namespace URI. The target of the processing instruction. All other nodes . When overridden in a derived class, gets the of the current node without any namespace prefix. Method 2.0.0.0 4.0.0.0 System.String If is specified as the parameter, the currently assigned default namespace URI is returned. If no default namespace URI is explicitly assigned, and is specified as the parameter, the blank prefix is associated with elements that are not in any namespace, and is returned. The prefix to namespace URI mappings can change from node to node in an XML document. As a result, the value of the method may not be consistent from one node to the next. Gets the namespace URI for the specified prefix. A that contains the namespace URI assigned to the namespace prefix specified; null if no namespace URI is assigned to the prefix specified. The returned is atomized. The prefix whose namespace URI you want to resolve. To match the default namespace, pass . Method 2.0.0.0 4.0.0.0 System.String The method returns the first prefix that matches the namespace URI specified. Multiple prefixes referring to the same namespace URI are not ordered in any particular way, so a particular prefix may not be returned each time when more than one is assigned. Namespace URI to prefix mappings can change from node to node in an XML document. As a result, the value of the method may not be consistent from one node to the next. Gets the prefix declared for the specified namespace URI. A that contains the namespace prefix assigned to the namespace URI specified; otherwise, if no prefix is assigned to the namespace URI specified. The returned is atomized. The namespace URI to resolve for the prefix. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean This method has no affect on the state of the . Determines whether the current node matches the specified XPath expression. true if the current node matches the specified XPath expression; otherwise, false. The XPath expression. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean This method has no effect on the state of the . This method is identical to the method, except that a object containing the compiled XPath expression is specified, rather than an XPath expression . Determines whether the current node matches the specified . true if the current node matches the ; otherwise, false. An object containing the compiled XPath expression. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean This method always returns true if the specified is an that shares the same implementation and points at the same document instance as the current . This method always returns false if the specified is an that has a different implementation than the current . When overridden in a derived class, moves the to the same position as the specified . Returns true if the is successful moving to the same position as the specified ; otherwise, false. If false, the position of the is unchanged. The positioned on the node that you want to move to. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean If the is not currently positioned on an element, this method returns false. After a successful call to , the , and properties reflect the values of the attribute. When the is positioned on an attribute, the methods , , and are not applicable. These methods always return false and do not change the position of the navigator. Rather, you can call to move to the next attribute node. Once positioned on an attribute, you can call to move to the owner element. Moves the to the attribute with the matching local name and namespace URI. Returns true if the is successful moving to the attribute; otherwise, false. If false, the position of the is unchanged. The local name of the attribute. The namespace URI of the attribute; null for an empty namespace. Method 2.0.0.0 4.0.0.0 System.Boolean The return value of the method depends on the of the current node, and the of the child node to move to. The following table shows the different nodes, and the child nodes they can move to. Current Node's XPathNodeType Child Node's XPathNodeType , , , or . , , , or . All other values None. Moves the to the child node of the specified. Returns true if the is successful moving to the child node; otherwise, false. If false, the position of the is unchanged. The of the child node to move to. Method 2.0.0.0 4.0.0.0 System.Boolean To be added. Moves the to the child node with the local name and namespace URI specified. Returns true if the is successful moving to the child node; otherwise, false. If false, the position of the is unchanged. The local name of the child node to move to. The namespace URI of the child node to move to. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean To be added. Moves the to the first sibling node of the current node. Returns true if the is successful moving to the first sibling node of the current node; false if there is no first sibling, or if the is currently positioned on an attribute node. If the is already positioned on the first sibling, will return true and will not move its position. If returns false because there is no first sibling, or if is currently positioned on an attribute, the position of the is unchanged. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean If the is not currently positioned on an element, this method returns false and the position of the does not change. After a successful call to , the , and properties reflect the values of the attribute. When the is positioned on an attribute, the methods , , and are not applicable. These methods always return false and do not change the position of the . Rather, you can call to move to the next attribute node. After the is positioned on an attribute, you can call to move to the owner element. When overridden in a derived class, moves the to the first attribute of the current node. Returns true if the is successful moving to the first attribute of the current node; otherwise, false. If false, the position of the is unchanged. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean and are the only two values that can have children. This property always returns false for all other node types. When overridden in a derived class, moves the to the first child node of the current node. Returns true if the is successful moving to the first child node of the current node; otherwise, false. If false, the position of the is unchanged. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean The class returns namespace nodes in reverse document order. Therefore, essentially moves to the last namespace node in the current scope. After the has been moved to the namespace node, the property reflects the name of the namespace. When the is positioned on a namespace node, the methods , , and are not applicable. These methods always return false and do not change the position of the . Rather, you can call to move to the next namespace node. After the is positioned on an namespace node, call to move back to the element node. For a definition of namespace nodes, see section 5.4 of the W3C XML Path Language (XPath) recommendation located at http://www.w3.org/TR/xpath#data-model. Moves the to first namespace node of the current node. Returns true if the is successful moving to the first namespace node; otherwise, false. If false, the position of the is unchanged. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean The class returns namespace nodes in reverse document order. Therefore, essentially moves to the last namespace node in the current scope. Using the following XML fragment as an example, if the is positioned on the data node, behaves in the following manner. MoveToFirstNamespace(XPathNamespaceScope.All) moves to one of the following namespace nodes: xmlns:c='C', xmlns:a='A2', xmlns='', xmlns:b='B', or xmlns:xml='http://www.w3.org/XML/1998/namespace'. MoveToFirstNamespace(XPathNamespaceScope.ExcludeXml) moves to one of the following namespace nodes: xmlns:c='C', xmlns:a='A2', xmlns='', or xmlns:b='B'. MoveToFirstNamespace(XPathNamespaceScope.Local) moves to the xmlns:c='C' node. <root xmlns='urn:default' xmlns:a='A1' xmlns:b='B'> <item xmlns='' xmlns:a='A2'> <data xmlns:c='C' /> </item> </root> If the is not currently positioned on an element, this method returns false and the position of the does not change. After the has been moved to the namespace node, the property reflects the name of the namespace. When the is positioned on a namespace node, the methods , , and are not applicable. These methods always return false and do not change the position of the . Rather, you can call to move to the next namespace node. After the is positioned on an namespace node, call to move back to the element node. For a definition of namespace nodes, see section 5.4 of the W3C XML Path Language (XPath) recommendation located at http://www.w3.org/TR/xpath#data-model. When overridden in a derived class, moves the to the first namespace node that matches the specified. Returns true if the is successful moving to the first namespace node; otherwise, false. If false, the position of the is unchanged. An value describing the namespace scope. Method 2.0.0.0 4.0.0.0 System.Boolean The method does not move to attribute or namespace nodes. If the parameter value is or , the method returns false and the position of the is unchanged. If the method returns false, the position of the is unchanged. Moves the to the following element of the specified in document order. true if the moved successfully; otherwise false. The of the element. The cannot be or . Method 2.0.0.0 4.0.0.0 System.Boolean If the method returns false, the position of the is unchanged. Moves the to the element with the local name and namespace URI specified in document order. true if the moved successfully; otherwise false. The local name of the element. The namespace URI of the element. Method 2.0.0.0 4.0.0.0 System.Boolean The method does not move to attribute or namespace nodes. If the parameter value is or , the method returns false and the position of the is unchanged. If the boundary passed as a parameter is not positioned after the position of the current it is ignored. If boundary passed as a parameter is null the next following node with the specified is located in document order. The methods cannot be used to move to attribute or namespace nodes. If the boundary passed as a parameter is positioned over an attribute or namespace node, it is equivalent to the boundary parameter having been positioned on the first child node of its parent element. This ensures that the parent element of the attribute or namespace node that the boundary parameter is positioned on can be matched by this method. If the method returns false, the position of the is unchanged. Moves the to the following element of the specified, to the boundary specified, in document order. true if the moved successfully; otherwise false. The of the element. The cannot be or . The object positioned on the element boundary which the current will not move past while searching for the following element. Method 2.0.0.0 4.0.0.0 System.Boolean If the boundary passed as a parameter is not positioned after the position of the current it is ignored. If the boundary parameter is null, the following element with the local name and namespace URI specified is located in document order. The methods cannot be used to move to attribute or namespace nodes. If the boundary passed as a parameter is positioned over an attribute or namespace node, it is equivalent to the boundary parameter having been positioned on the first child node of its parent element. This ensures that the parent element of the attribute or namespace node that the boundary parameter is positioned on can be matched by this method. If the method returns false, the position of the is unchanged. Moves the to the element with the local name and namespace URI specified, to the boundary specified, in document order. true if the moved successfully; otherwise false. The local name of the element. The namespace URI of the element. The object positioned on the element boundary which the current will not move past while searching for the following element. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean This method can be used to identify nodes by unique ID provided the source document explicitly declares attributes of type ID using a DTD. For example, suppose the following XML data, <data><x a="a1"/></data>, was loaded using a DTD that included the following: <!ATTLIST x a ID #REQUIRED>. If the was positioned somewhere in the XML data, calling MoveToId("a1") positions the on the element node x. When overridden in a derived class, moves to the node that has an attribute of type ID whose value matches the specified . true if the is successful moving; otherwise, false. If false, the position of the navigator is unchanged. A representing the ID value of the node to which you want to move. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean After the has been moved to the namespace node, the property reflects the name of the namespace. When the is positioned on a namespace node, the methods , , and are not applicable. These methods always return false and do not change the position of the . Rather, you can call to move to the next namespace node. After the is positioned on a namespace node, you can call to move back to the element node. For a definition of namespace nodes, see section 5.4 of the W3C XML Path Language (XPath) recommendation located at http://www.w3.org/TR/xpath#data-model. Moves the to the namespace node with the specified namespace prefix. true if the is successful moving to the specified namespace; false if a matching namespace node was not found, or if the is not positioned on an element node. If false, the position of the is unchanged. The namespace prefix of the namespace node. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean To be added. When overridden in a derived class, moves the to the next sibling node of the current node. true if the is successful moving to the next sibling node; otherwise, false if there are no more siblings or if the is currently positioned on an attribute node. If false, the position of the is unchanged. Method 2.0.0.0 4.0.0.0 System.Boolean The return value of the method depends on the of the current node and the of the next sibling node to move to. The following table shows the different nodes and the sibling nodes they can move to. Current Node's XPathNodeType Sibling Node's XPathNodeType , , , or . , , , or . , , , or . , , , or . All other values None. Moves the to the next sibling node of the current node that matches the specified. true if the is successful moving to the next sibling node; otherwise, false if there are no more siblings or if the is currently positioned on an attribute node. If false, the position of the is unchanged. The of the sibling node to move to. Method 2.0.0.0 4.0.0.0 System.Boolean To be added. Moves the to the next sibling node with the local name and namespace URI specified. Returns true if the is successful moving to the next sibling node; false if there are no more siblings, or if the is currently positioned on an attribute node. If false, the position of the is unchanged. The local name of the next sibling node to move to. The namespace URI of the next sibling node to move to. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean If the is not currently positioned on an attribute, this method returns false and the position of the does not change. When the is positioned on an attribute, the methods , , and methods are not applicable. These methods always return false and do not change the position of the . After the is positioned on an attribute, you can call to move to the owner element. When overridden in a derived class, moves the to the next attribute. Returns true if the is successful moving to the next attribute; false if there are no more attributes. If false, the position of the is unchanged. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean The class returns namespace nodes in reverse document order. Therefore, essentially moves to the namespace node above the one in the current scope. If the is not currently positioned on a namespace node, this method returns false and the position of the does not change. When the is positioned on a namespace node, the methods , , and are not applicable. These methods always return false and do not change the position of the . After the is positioned on an namespace node, call to move back to the element node. For a definition of namespace nodes, see section 5.4 of the W3C XML Path Language (XPath) recommendation located at http://www.w3.org/TR/xpath#data-model. Moves the to the next namespace node. Returns true if the is successful moving to the next namespace node; otherwise, false. If false, the position of the is unchanged. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean The class returns namespace nodes in reverse document order. If the is not currently positioned on a namespace node, this method returns false and the position of the does not change. When the is positioned on a namespace node, the methods , , and are not applicable. These methods always return false and do not change the position of the . After the is positioned on an namespace node, call to move back to the element node. For a definition of namespace nodes, see section 5.4 of the W3C XML Path Language (XPath) recommendation located at http://www.w3.org/TR/xpath#data-model. When overridden in a derived class, moves the to the next namespace node matching the specified. Returns true if the is successful moving to the next namespace node; otherwise, false. If false, the position of the is unchanged. An value describing the namespace scope. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean The return value of the method depends on the of the current node, and the of the parent node to move to. The following table shows the different nodes, and the parent nodes they can move to. XPathNodeType Parent Node nodes do not have parents. or node. node. node. node. or node. or node. or node. or node. When overridden in a derived class, moves the to the parent node of the current node. Returns true if the is successful moving to the parent node of the current node; otherwise, false. If false, the position of the is unchanged. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Boolean To be added. When overridden in a derived class, moves the to the previous sibling node of the current node. Returns true if the is successful moving to the previous sibling node; otherwise, false if there is no previous sibling node or if the is currently positioned on an attribute node. If false, the position of the is unchanged. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Void All nodes belong to one and only one document. Therefore, this method is always successful. Moves the to the root node that the current node belongs to. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.String A string that represents the tag name or the namespace prefix. The returned depends on the of the current node. For example, the name for the <bk:book> element is bk:book. The following table lists the value returned by the property, based on the of the current node. XPathNodeType Property Value The qualified name of the . In the following example, <bk:book>, the name of the element node is bk:book. The qualified name of the . In the following example, <book bk:genre='novel'>, the name of the node is bk:genre. The prefix associated with the namespace URI. In the following namespace declaration, xmlns:bk='urn:samples', the property returns bk. The target of the . In the following example, <?xml-stylesheet type='text/xsl' href= 'books.xsl'?>, the property returns xml-stylesheet. All other nodes . When overridden in a derived class, gets the qualified name of the current node. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.String A string that represents the namespace URI. The namespace URI returned depends on the of the current node. The property returns urn:samples for the node <bk:book xmlns:bk='urn:samples'>. Only and nodes can have a namespace URI. When overridden in a derived class, gets the namespace URI of the current node. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XmlNameTable An instance for this instance. The stores atomized strings of any local name, namespace URI, and prefix used by the . This means that when the same is returned multiple times (like "book"), the same object is returned for that . This makes it possible to write efficient code that does object comparisons on these strings, instead of expensive string comparisons. When overridden in a derived class, gets the of the . Property 2.0.0.0 4.0.0.0 System.Collections.IEqualityComparer To be added. The property allows objects to be compared on the basis of position rather than reference to the object. The and methods implemented by this class are based on the position of the objects passed as parameters. The method implemented by this class uses the properties of the node such as its local name and namespace URI to create a hash code for the node. Gets an used for equality comparison of objects. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeType An value that indicates the node type of the current node. The initial value of this property depends on the each XPathNavigator implementation (that is, it depends on ). When overridden in a derived class, gets the of the current node. Property 2.0.0.0 4.0.0.0 System.String To be added. The and properties are not very efficient. If performance is a priority, it is more efficient to use the node navigation methods of the to get values of child nodes. Gets or sets the markup representing the opening and closing tags of the current node and its child nodes. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.String A string that represents the prefix of the current node, or String.Empty if the current node is namespace. The property gets the namespace prefix associated with the current node. For example, the property returns bk for the <bk:book> element. If a prefix does not exist, or the of the current node is not or , the property returns . When overridden in a derived class, gets the namespace prefix associated with the current node. Method 2.0.0.0 4.0.0.0 System.Xml.XmlWriter Prepending a child node adds the new node to the beginning of the list of child nodes for the current node. For example, when three child nodes exist for an element, the prepended node becomes the first child node. If no child nodes exist, then a new child node is created. The following are important notes to consider when using the method. The new child node is not inserted until the method of the object is called. The method is valid only when the is positioned on an element node. The method does not affect the position of the . Returns an object used to create a new child node at the beginning of the list of child nodes of the current node. An object used to create a new child node at the beginning of the list of child nodes of the current node. Method 2.0.0.0 4.0.0.0 System.Void Prepending a child node adds the new node to the beginning of the list of child nodes for the current node. For example, when three child nodes exist for an element, the prepended node becomes the first child node. If no child nodes exist, then a new child node is created. To create a new element node, include all XML syntax in the XML string parameter. The string for a new book node is PrependChild("<book/>"). The string for appending the text "book" to the current node's text node is PrependChild("book"). If the XML string contains multiple nodes, all nodes are added. The following are important notes to consider when using the method. The method is valid only when the is positioned on an element node. The method does not affect the position of the . Creates a new child node at the beginning of the list of child nodes of the current node using the XML string specified. The XML data string for the new child node. Method 2.0.0.0 4.0.0.0 System.Void Prepending a child node adds the new node to the beginning of the list of child nodes for the current node. For example, when three child nodes exist for an element, the prepended node becomes the first child node. If no child nodes exist, then a new child node is created. The following are important notes to consider when using the method. If the object is positioned over a sequence of XML nodes, all the nodes in the sequence are added. The method is valid only when the is positioned on an element node. The method does not affect the position of the . Creates a new child node at the beginning of the list of child nodes of the current node using the XML contents of the object specified. An object positioned on the XML data for the new child node. Method 2.0.0.0 4.0.0.0 System.Void Prepending a child node adds the new node to the beginning of the list of child nodes for the current node. For example, when three child nodes exist for an element, the prepended node becomes the first child node. If no child nodes exist, then a new child node is created. The following are important notes to consider when using the method. If the object is positioned over a sequence of XML nodes, all the nodes in the sequence are added. The method is valid only when the is positioned on an element node. The method does not affect the position of the . Creates a new child node at the beginning of the list of child nodes of the current node using the nodes in the object specified. An object positioned on the node to add as the new child node. Method 2.0.0.0 4.0.0.0 System.Void Prepending a child node adds the new node to the beginning of the list of child nodes for the current node. For example, when three child nodes exist for an element, the prepended node becomes the first child node. If no child nodes exist, then a new child node is created. Namespace prefix and URI values can be obtained by using the or method. For example, the following syntax prepends a child element by using the in-scope namespace xmlns:bk="http://www.contoso.com/books": navigator.PrependChildElement(navigator.Prefix, "pages", LookupNamespaceURI(navigator.Prefix), String.Empty) This creates the new child <bk:pages/> element. The following are important notes to consider when using the method. If the namespace prefix specified is null or , then the prefix for the namespace URI of the new element is obtained from the current namespaces in-scope. If there is no namespace prefix assigned to the specified namespace URI at the current scope, then a namespace prefix is automatically generated. The method is valid only when the is positioned on an element node. The method does not affect the position of the . Creates a new child element at the beginning of the list of child nodes of the current node using the namespace prefix, local name, and namespace URI specified with the value specified. The namespace prefix of the new child element (if any). The local name of the new child element (if any). The namespace URI of the new child element (if any). and null are equivalent. The value of the new child element. If or null are passed, an empty element is created. Method 2.0.0.0 4.0.0.0 System.Xml.XmlReader When the object is created with the current node and its child nodes, the object's property is set to . When the object's method is called for the first time, the is moved to the current node of the . The new object continues to read until the end of the XML tree is reached. At this point, the method returns false and the object's property is set to . Changing the position of the object does not affect the position of the . Namespace declarations for the in-scope namespaces of the current node are not inserted into the XML stream provided to the object. This behavior differs from the method. This method creates the object with specific reader settings, and the module that uses this method has no control over those settings. For example, the reader returned by this method prohibits processing Data Type Definitions (DTDs). If the reader attempts to read a file that uses a DTD, it will throw an error, . The message for the exception will be Unexpected DTD declaration. You can change this behavior by implementing a custom that returns an with the desired . Returns an object that contains the current node and its child nodes. An object that contains the current node and its child nodes. Method 2.0.0.0 4.0.0.0 System.Xml.XmlWriter The method replaces a range of sibling nodes from the current node the is positioned on (inclusive) to the node specified by the parameter (inclusive). The replacement range is not inserted until the method of the object is called. Replaces a range of sibling nodes from the current node to the node specified. An object used to specify the replacement range. An positioned on the last sibling node in the range to replace. Method 2.0.0.0 4.0.0.0 System.Void The is positioned on the new node on completion of the method and returns true. The is not positioned on the new node after completion of the method when the XML input is in which case the is either positioned on the next sibling node or the parent node if there is no next sibling node to the replaced node and the returns false. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. If the XML data string is not well-formed than an exception is thrown and the result of this method is equivalent to calling on the current node. If the XML string contains multiple nodes, all nodes are added and the is positioned on the first node in the series of nodes. The method is not equivalent to the method. Replaces the current node with the content of the string specified. The XML data string for the new node. Method 2.0.0.0 4.0.0.0 System.Void The is positioned on the new node on completion of the method and returns true. The is not positioned on the new node after completion of the method when the XML input is in which case the is either positioned on the next sibling node or the parent node if there is no next sibling node to the replaced node and the returns false. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. If the XML data string is not well-formed than an exception is thrown and the result of this method is equivalent to calling on the current node. If the XML string contains multiple nodes, all nodes are added and the is positioned on the first node in the series of nodes. The method is not equivalent to the method. Replaces the current node with the contents of the object specified. An object positioned on the XML data for the new node. Method 2.0.0.0 4.0.0.0 System.Void The is positioned on the new node on completion of the method and returns true. The is not positioned on the new node after completion of the method when the XML input is in which case the is either positioned on the next sibling node or the parent node if there is no next sibling node to the replaced node and the returns false. The method is valid only when the is positioned on an element, text, processing instruction, or comment node. If the XML data string is not well-formed than an exception is thrown and the result of this method is equivalent to calling on the current node. If the XML string contains multiple nodes, all nodes are added and the is positioned on the first node in the series of nodes. The method is not equivalent to the method. Replaces the current node with the contents of the object specified. An object positioned on the new node. Property 2.0.0.0 4.0.0.0 System.Xml.Schema.IXmlSchemaInfo To be added. Schema information can be set on , , or on nodes with a non-null . If the current node is not one of the above node types, or if the instance does not report schema information, the property returns null. Gets the schema information that has been assigned to the current node as a result of schema validation. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator The context for the selection is the position of the when this method is called. After calling this method, the returned represents the set of selected nodes. Use method of the to iterate over the selected node set. The following C# code iterates over the selected set of nodes. XPathNodeIterator iterator = nav.Select("/bookstore/book"); while (iterator.MoveNext()) { Console.WriteLine(Iterator.Current.Name); } The following are important notes to consider when using the method. You can still use any of the object's navigation methods to move within the . The navigation methods are independent of the selected nodes in the . Future calls to the method return a new object that points to the selected set of nodes that matches the new call. The two objects are completely independent of each other. If the XPath expression requires namespace resolution, use the overload, which takes an as its argument. This method has no effect on the state of the . Selects a node set, using the specified XPath expression. An pointing to the selected node set. A representing an XPath expression. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator The context for the selection is the position of the when you called this method. After you call this method, the returned represents the set of selected nodes. Use on the to iterate over the selected node set. The following C# code iterates over the selected set of nodes. XPathNodeIterator ni = nav.Select(expr); while (ni.MoveNext()) { Console.WriteLine(ni.Current.Name); } The following are important notes to consider when using the method. You can still use any of the object's navigation methods to move within the . The navigation methods are independent of the selected nodes in the . Future calls to the method return a new object that points to the selected set of nodes that matches the new call. The two objects are completely independent of each other. If the requires namespace resolution, the prefix and namespace URI pair must be added to an , and the method must be called to specify the to use for namespace resolution. For example, suppose the document contains the following XML nodes. <bookstore xmlns:bk='urn:samples'> <book bk:ISBN='1-325-0980'> <title>Pride And Prejudice</title> </book> </bookstore> In this case, the following C# code selects the bk:ISBN node. XPathExpression expr = nav.Compile("book/@bk:ISBN"); XmlNamespaceManager mngr = new XmlNamespaceManager(new NameTable()); mngr.AddNamespace("bk","urn:samples"); expr.SetContext(mngr); XPathNodeIterator ni = nav.Select(expr); If the does not include a prefix, it is assumed that the namespace URI is the empty namespace. If your XML includes a default namespace, you must still use the method and provide an that contains a prefix and namespace URI to handle the default namespace. For example, suppose you have the following XML. <bookstore xmlns="http://www.lucernepublishing.com"> <book> <title>Pride And Prejudice</title> </book> </bookstore> In this case, the following C# code selects all book nodes: XmlNamespaceManager nsmgr = new XmlNamespaceManager(nav.NameTable); nsmgr.AddNamespace("ab", "http://www.lucernepublishing.com"); XPathExpression expr; expr = nav.Compile("//ab:book"); expr.SetContext(nsmgr); XPathNodeIterator ni = nav.Select(expr); This method has no effect on the state of the . Selects a node set using the specified . An that points to the selected node set. An object containing the compiled XPath query. Method 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator To be added. Selects a node set using the specified XPath expression with the object specified to resolve namespace prefixes. An that points to the selected node set. A representing an XPath expression. The object used to resolve namespace prefixes. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator The method has no effect on the state of the . Selects all the ancestor nodes of the current node that have a matching . An that contains the selected nodes. The returned nodes are in reverse document order. The of the ancestor nodes. To include the context node in the selection, true; otherwise, false. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator If is specified as the parameter, all ancestor nodes that belong to the specified namespace URI are selected. If is specified as the parameter, all ancestor nodes with the specified local name that belong to no namespace are selected. If is specified as both the local name and namespace URI, all ancestor nodes that belong to no namespace are selected. The method has no effect on the state of the . Selects all the ancestor nodes of the current node that have the specified local name and namespace URI. An that contains the selected nodes. The returned nodes are in reverse document order. The local name of the ancestor nodes. The namespace URI of the ancestor nodes. To include the context node in the selection, true; otherwise, false. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator The method has no effect on the state of the . Selects all the child nodes of the current node that have the matching . An that contains the selected nodes. The of the child nodes. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator If is specified as the parameter, all child nodes that belong to the specified namespace URI are selected. If is specified as the parameter, all child nodes with the specified local name that belong to no namespace are selected. If both the local name and namespace URI parameters are , all child nodes that belong to no namespace are selected. The method has no effect on the state of the . Selects all the child nodes of the current node that have the local name and namespace URI specified. An that contains the selected nodes. The local name of the child nodes. The namespace URI of the child nodes. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator The method has no effect on the state of the . Selects all the descendant nodes of the current node that have a matching . An that contains the selected nodes. The of the descendant nodes. true to include the context node in the selection; otherwise, false. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNodeIterator If is specified as the parameter, all descendant nodes that belong to the specified namespace URI are selected. If is specified as the parameter, all descendant nodes with the specified local name that belong to no namespace are selected. If both the local name and namespace URI parameters are , all descendant nodes that belong to no namespace are selected. A descendant is a child or a child of a child and so on; thus the selected nodes will never contain attribute or namespace nodes. The method has no effect on the state of the . Selects all the descendant nodes of the current node with the local name and namespace URI specified. An that contains the selected nodes. The local name of the descendant nodes. The namespace URI of the descendant nodes. true to include the context node in the selection; otherwise, false. Method 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNavigator The method selects the first node that matches the XPath query in the object. Selects a single node in the using the specified XPath query. An object that contains the first matching node for the XPath query specified; otherwise, null if there are no query results. A representing an XPath expression. Method 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNavigator The method selects the first node that matches the compiled XPath query contained in the object in the . Selects a single node in the using the specified object. An object that contains the first matching node for the XPath query specified; otherwise null if there are no query results. An object containing the compiled XPath query. Method 2.0.0.0 4.0.0.0 System.Xml.XPath.XPathNavigator The method selects the first node that matches the XPath query specified. The method uses the object to resolve namespace prefixes. In XPath all namespaces must be prefixed in a query. If an XML document uses a default namespace, you must still add a namespace prefix to the object. Selects a single node in the object using the specified XPath query with the object specified to resolve namespace prefixes. An object that contains the first matching node for the XPath query specified; otherwise null if there are no query results. A representing an XPath expression. The object used to resolve namespace prefixes in the XPath query. Method 2.0.0.0 4.0.0.0 System.Void When an object is created as the result of a schema validating object, the value specified to the method is verified against the XML Schema Definition Language (XSD) schema for the XML document. If the value specified is invalid according to the schema for the XML document, an is thrown. The method is valid only when the is positioned on an element or attribute node. Sets the typed value of the current node. The new typed value of the node. Method 2.0.0.0 4.0.0.0 System.Void If the is positioned on an element node with complex content (child elements), calling the method replaces the child elements with a text node containing the new string value. The method cannot update the root node or namespace nodes. Sets the value of the current node. The new value of the node. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.Object This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. For a description of this member, see . Creates a new copy of the object. A new copy of the object. Method 1.0.5000.0 2.0.0.0 4.0.0.0 System.String The content returned by the method depends on the of the node. XPathNodeType Property Value The of the root node. The of the element. The value of the attribute. The content of the text node. The entire content excluding the target. The content of the comment. The white space between mark-up. The white space between markup in a mixed content model, or white space within an xml:space='preserve' scope. Gets the text value of the current node. A string that contains the text value of the current node. Property 2.0.0.0 4.0.0.0 System.Object To be added. For attributes and elements with atomic simple type or simple text content, the property returns a boxed of the most appropriate .NET Framework . If the element or attribute's content is a list type, the property returns an array of objects of the most appropriate .NET Framework . The following table describes the returned by each . XPathNodeType TypedValue Returned Returns a object containing all node descendants of the document, concatenated and separated by white space. If the document does not have any node children, is returned. (typed or simple content) Returns an that represents the typed value of the . If the is defined as an XML Schema list data type, then the node value is exposed as an array of objects. Each in the array contains the typed value of a child of the element. (untyped, mixed, or complex content) Returns a object containing all node descendants of the (including string representations of typed values), concatenated and separated by white space. If the does not have any node children, is returned. (typed or simple content) Returns an that represents the typed value of the . The is boxed as a .NET Framework value. If the is defined as an XML Schema list data type, the node value is exposed as an array of objects. Each in the array contains the typed value of a child of the . A object containing the text. A object containing the content of the comments, excluding the surrounding <!-- and -->. A object containing the content of the processing instruction, excluding the target and surrounding <? and ?>. A object containing the namespace name. A object containing the text of the node. A object containing the text of the node. Gets the current node as a boxed object of the most appropriate .NET Framework type. Property 2.0.0.0 4.0.0.0 System.Object To be added. The property can be used by implementations which provide a "virtualized" XML view over a store, to provide access to underlying objects. For example, if an object is used to provide a virtual XML view over a Common Language Runtime (CLR) object graph, you may wish to perform XPath queries using the method and then access the CLR objects underlying the selected nodes. The property would expose these underlying objects. In many cases, this value will be null, and the object returned by the property will always be implementation specific. The property should preserve object identity and should only be used to return objects that have a one-to-one correspondence to their respective overlaid items. A user should always get the same object on successive visits to the same node using the same object or a cloned one. The property of an object created by an object returns the corresponding . Used by implementations which provide a "virtualized" XML view over a store, to provide access to underlying objects. Property System.String A string that represents the value of the current node. The definition of the "value" of a node is 1) concatenation of the values of each descendant nodes for and nodes, 2) namespace URI for , and 3) value string (as is) for all other kind of node types. Note: When the instance of this class is created from , the sequential nodes (except for nodes) are regarded as one text or node (strictly to say, , or ). Gets the value of the current node. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 4.0.0.0 System.Object The method attempts to convert the value of the current node to the .NET Framework type, specified according to the XPath 2.0 rules for casting the current node's type. The object is used to resolve namespace prefixes related to type conversions. For example, when converting an xs:QName to an xs:string. Gets the current node's value as the specified, using the object specified to resolve namespace prefixes. The value of the current node as the requested. The to return the current node's value as. The object used to resolve namespace prefixes. Property 2.0.0.0 4.0.0.0 System.Boolean To be added. If the has schema or type information (for example, from an object initialized with an XML schema validating ), and if the current node is defined as an XML Schema xs:boolean type, the property returns the current node's value as an unboxed object. However, if the does not have any schema or type information, the property attempts to convert the string value of the current node to a value, according to the XPath 2.0 casting rules for xs:boolean. Gets the current node's value as a . Property 2.0.0.0 4.0.0.0 System.DateTime To be added. If the has schema or type information (for example, from an object initialized with an XML schema validating ), and if the current node is defined as an XML Schema xs:datetime type, the property returns the current node's value as an unboxed object. However, if the does not have any schema or type information, the property attempts to convert the string value of the current node to a value, according to the XPath 2.0 casting rules for xs:datetime. Gets the current node's value as a . Property 2.0.0.0 4.0.0.0 System.Double To be added. If the has schema or type information (for example, from an object initialized with an XML schema validating ), and if the current node is defined as an XML Schema xs:double type, the property returns the current node's value as an unboxed object. However, if the does not have any schema or type information, the property attempts to convert the string value of the current node to a value, according to the XPath 2.0 casting rules for xsd:double. Gets the current node's value as a . Property 2.0.0.0 4.0.0.0 System.Int32 To be added. If the has schema or type information (for example, from an object initialized with an XML schema validating ), and if the current node is defined as an XML Schema xs:integer type, the property returns the current node's value as an unboxed object. However, if the does not have any schema or type information, the property attempts to convert the string value of the current node to a value, according to the XPath 2.0 casting rules for xs:integer. Gets the current node's value as an . Property 2.0.0.0 4.0.0.0 System.Int64 To be added. If the has schema or type information (for example, from an object initialized with an XML schema validating ), and if the current node is defined as an XML Schema xs:integer type, the property returns the current node's value as an unboxed object. However, if the does not have any schema or type information, the property attempts to convert the string value of the current node to a value, according to the XPath 2.0 casting rules for xs:integer. Gets the current node's value as an . Property 2.0.0.0 4.0.0.0 System.Type To be added. The property gets the .NET Framework of the typed value of the current node. For example, an element of type xs:int would have a of by default. However, the could be any one of the valid types that can be mapped to xs:int such as or . If a node has no type, this is equivalent to the type annotation on the node being xdt:untypedAtomic. In this case, the property returns a string for the node. For more information, see Type Support in the System.Xml Classes. Gets the .NET Framework of the current node. Method 2.0.0.0 4.0.0.0 System.Void Namespace declarations for the in-scope namespaces of the current node are inserted into the XML streamed to the object specified. For example, if the method is called on the first book element of the books.xml file, the http://www.contoso.com/books namespace declaration made at the top of the XML document will appear in the XML streamed to the object specified as shown in the following example. <?xml version="1.0" encoding="utf-8"?> <book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0" xmlns="http://www.contoso.com/books"> <title>The Autobiography of Benjamin Franklin</title> <author> <first-name>Benjamin</first-name> <last-name>Franklin</last-name> </author> <price>8.99</price> </book> The method does not affect the position of the . Streams the current node and its child nodes to the object specified. The object to stream to. Property 1.0.5000.0 2.0.0.0 4.0.0.0 System.String A string value that contains xml:lang context value. In the example XML below, when the is positioned on the name element, the property returns a scope of en-us indicating that the node is in the scope of a xml:lang="en-us" attribute. <root xml:lang="en-us"> <name>Name</name> </root> Gets the xml:lang scope for the current node. Property 2.0.0.0 4.0.0.0 System.Xml.Schema.XmlSchemaType To be added. The following are important notes to consider when using the property. The property is null, unless the property of the property of the is set to . If this node is valid, the property is the same as the property of the property of the , unless this node is a member of a union. If this node is a member of a union, the property is the same as the property of the property of this . Gets the information for the current node.