1 using MS.Internal.Xml.XPath;
13 [DebuggerDisplay(
"{debuggerDisplayProxy}")]
16 private class CheckValidityHelper
22 private XPathNavigatorReader reader;
24 internal bool IsValid => isValid;
29 this.nextEventHandler = nextEventHandler;
40 if (ex !=
null && reader !=
null)
44 if (nextEventHandler !=
null)
46 nextEventHandler(sender, args);
55 [DebuggerDisplay(
"{ToString()}")]
56 internal struct DebuggerDisplayProxy
67 string text = nav.
NodeType.ToString();
71 text = text +
", Name=\"" + nav.
Name +
"\"";
76 text = text +
", Name=\"" + nav.
Name +
"\"";
77 text = text +
", Value=\"" +
XmlConvert.EscapeValueForDebuggerDisplay(nav.
Value) +
"\"";
83 text = text +
", Value=\"" +
XmlConvert.EscapeValueForDebuggerDisplay(nav.
Value) +
"\"";
90 internal static readonly XPathNavigatorKeyComparer comparer =
new XPathNavigatorKeyComparer();
92 internal static readonly
char[] NodeTypeLetter =
new char[10]
106 internal static readonly
char[] UniqueIdTbl =
new char[32]
142 internal const int AllMask =
int.MaxValue;
144 internal const int NoAttrNmspMask = 2147483635;
146 internal const int TextMask = 112;
148 internal static readonly
int[] ContentKindMasks =
new int[10]
164 public sealed
override bool IsNode =>
true;
176 if (memberType !=
null)
193 if (schemaInfo !=
null)
198 if (xmlSchemaType ==
null)
202 if (xmlSchemaType !=
null)
205 if (datatype !=
null)
207 return xmlSchemaType.ValueConverter.ChangeType(
Value, datatype.
ValueType,
this);
214 if (xmlSchemaType !=
null)
217 if (datatype !=
null)
235 if (schemaInfo !=
null)
240 if (xmlSchemaType ==
null)
244 if (xmlSchemaType !=
null)
247 if (datatype !=
null)
256 if (xmlSchemaType !=
null)
259 if (datatype !=
null)
266 return typeof(
string);
279 if (schemaInfo !=
null)
284 if (xmlSchemaType ==
null)
288 if (xmlSchemaType !=
null)
290 return xmlSchemaType.ValueConverter.ToBoolean(
Value);
296 if (xmlSchemaType !=
null)
299 if (datatype !=
null)
306 return XmlUntypedConverter.Untyped.ToBoolean(
Value);
319 if (schemaInfo !=
null)
324 if (xmlSchemaType ==
null)
328 if (xmlSchemaType !=
null)
330 return xmlSchemaType.ValueConverter.ToDateTime(
Value);
336 if (xmlSchemaType !=
null)
339 if (datatype !=
null)
346 return XmlUntypedConverter.Untyped.ToDateTime(
Value);
359 if (schemaInfo !=
null)
364 if (xmlSchemaType ==
null)
368 if (xmlSchemaType !=
null)
370 return xmlSchemaType.ValueConverter.ToDouble(
Value);
376 if (xmlSchemaType !=
null)
379 if (datatype !=
null)
386 return XmlUntypedConverter.Untyped.ToDouble(
Value);
399 if (schemaInfo !=
null)
404 if (xmlSchemaType ==
null)
408 if (xmlSchemaType !=
null)
410 return xmlSchemaType.ValueConverter.ToInt32(
Value);
416 if (xmlSchemaType !=
null)
419 if (datatype !=
null)
426 return XmlUntypedConverter.Untyped.ToInt32(
Value);
439 if (schemaInfo !=
null)
444 if (xmlSchemaType ==
null)
448 if (xmlSchemaType !=
null)
450 return xmlSchemaType.ValueConverter.ToInt64(
Value);
456 if (xmlSchemaType !=
null)
459 if (datatype !=
null)
466 return XmlUntypedConverter.Untyped.ToInt64(
Value);
497 public abstract string Name 511 public abstract string Prefix 540 if (xPathNavigator.
MoveToAttribute(
"lang",
"http://www.w3.org/XML/1998/namespace"))
542 return xPathNavigator.
Value;
608 return "xmlns=\"" +
Value +
"\"";
614 xmlWriterSettings.
Indent =
true;
620 xmlWriter.
WriteNode(
this, defattr:
true);
648 xmlWriterSettings.
Indent =
true;
658 xmlWriter.
WriteNode(
this, defattr:
true);
693 if (value.Length != 0)
708 internal uint IndexInParent
743 internal virtual string UniqueId
747 XPathNavigator xPathNavigator = Clone();
752 uint num = xPathNavigator.IndexInParent;
753 if (!xPathNavigator.MoveToParent())
759 stringBuilder.
Append(UniqueIdTbl[num]);
762 stringBuilder.
Append(
'0');
765 stringBuilder.
Append(UniqueIdTbl[num & 0x1F]);
769 stringBuilder.
Append(
'0');
775 private object debuggerDisplayProxy =>
new DebuggerDisplayProxy(
this);
802 if (typedValue ==
null)
813 if (schemaInfo !=
null)
816 if (schemaType !=
null)
818 text = schemaType.ValueConverter.ToString(typedValue,
this);
824 text = XmlUntypedConverter.Untyped.ToString(typedValue,
this);
837 if (nsResolver ==
null)
842 if (schemaInfo !=
null)
847 if (xmlSchemaType ==
null)
851 if (xmlSchemaType !=
null)
853 return xmlSchemaType.ValueConverter.ChangeType(
Value, returnType, nsResolver);
859 if (xmlSchemaType !=
null)
862 if (datatype !=
null)
864 return xmlSchemaType.ValueConverter.ChangeType(datatype.
ParseValue(
Value,
NameTable, nsResolver), returnType, nsResolver);
869 return XmlUntypedConverter.Untyped.ChangeType(
Value, returnType, nsResolver);
905 string value =
Value;
909 if (prefix.Length == 0)
915 return "http://www.w3.org/XML/1998/namespace";
917 if (prefix ==
"xmlns")
919 return "http://www.w3.org/2000/xmlns/";
929 if (namespaceURI ==
null)
945 if (namespaceURI == xPathNavigator.
Value)
956 if (namespaceURI ==
"http://www.w3.org/XML/1998/namespace")
960 if (namespaceURI ==
"http://www.w3.org/2000/xmlns/")
984 dictionary[
"xml"] =
"http://www.w3.org/XML/1998/namespace";
991 string value =
Value;
992 if (localName.Length != 0 || value.Length != 0 || scope ==
XmlNamespaceScope.Local)
994 dictionary[localName] = value;
1017 return CreateReader();
1041 string value =
Value;
1084 return "http://www.w3.org/XML/1998/namespace";
1086 if (name ==
"xmlns")
1088 return "http://www.w3.org/2000/xmlns/";
1090 return string.Empty;
1092 string value =
Value;
1192 public abstract bool MoveToId(
string id);
1198 public virtual bool MoveToChild(
string localName,
string namespaceURI)
1222 int contentKindMask = GetContentKindMask(type);
1225 if (((1 << (
int)
NodeType) & contentKindMask) != 0)
1262 end.MoveToNonDescendant();
1310 int contentKindMask = GetContentKindMask(type);
1318 end.MoveToNonDescendant();
1345 while (((1 << (
int)
NodeType) & contentKindMask) == 0);
1353 public virtual bool MoveToNext(
string localName,
string namespaceURI)
1374 int contentKindMask = GetContentKindMask(type);
1377 if (((1 << (
int)
NodeType) & contentKindMask) != 0)
1427 int num = GetDepth(xPathNavigator.Clone());
1428 int num2 = GetDepth(xPathNavigator2.Clone());
1468 bool flag = xPathNavigator.GetType().
ToString() !=
"Microsoft.VisualStudio.Modeling.StoreNavigator";
1469 return CompareSiblings(xPathNavigator, xPathNavigator2);
1488 if (schemas ==
null)
1492 xmlSchemaType =
null;
1496 if (schemas ==
null)
1501 if (schemaInfo !=
null)
1506 if (xmlSchemaType ==
null && xmlSchemaElement ==
null)
1514 if (schemas ==
null)
1519 if (schemaInfo !=
null)
1524 if (xmlSchemaType ==
null && xmlSchemaAttribute ==
null)
1534 CheckValidityHelper checkValidityHelper =
new CheckValidityHelper(validationEventHandler, xmlReader as XPathNavigatorReader);
1535 validationEventHandler = checkValidityHelper.ValidationCallback;
1536 XmlReader validatingReader = GetValidatingReader(xmlReader, schemas, validationEventHandler, xmlSchemaType, xmlSchemaElement, xmlSchemaAttribute);
1537 while (validatingReader.
Read())
1540 return checkValidityHelper.IsValid;
1545 if (schemaAttribute !=
null)
1547 return schemaAttribute.Validate(reader,
null, schemas, validationEvent);
1549 if (schemaElement !=
null)
1551 return schemaElement.Validate(reader,
null, schemas, validationEvent);
1553 if (schemaType !=
null)
1555 return schemaType.Validate(reader,
null, schemas, validationEvent);
1557 XmlReaderSettings xmlReaderSettings =
new XmlReaderSettings();
1560 xmlReaderSettings.Schemas = schemas;
1562 return XmlReader.Create(reader, xmlReaderSettings);
1606 return xPathNodeIterator.
Current;
1640 if (xPathNodeIterator ==
null)
1644 return xPathNodeIterator;
1686 CompiledXpathExpr compiledXpathExpr = expr as CompiledXpathExpr;
1687 if (compiledXpathExpr ==
null)
1691 Query query =
Query.Clone(compiledXpathExpr.QueryTree);
1693 if (context ==
null)
1695 context =
new XPathSingletonIterator(Clone(), moved:
true);
1697 object obj = query.Evaluate(context);
1700 return new XPathSelectionIterator(context.
Current, query);
1713 CompiledXpathExpr compiledXpathExpr = expr as CompiledXpathExpr;
1714 if (compiledXpathExpr ==
null)
1718 Query query =
Query.Clone(compiledXpathExpr.QueryTree);
1721 return query.MatchNode(
this) !=
null;
1725 throw XPathException.Create(
"Xp_InvalidPattern", compiledXpathExpr.Expression);
1737 return Matches(CompileMatchPattern(xpath));
1745 return new XPathChildIterator(Clone(), type);
1756 return new XPathChildIterator(Clone(), name, namespaceURI);
1765 return new XPathAncestorIterator(Clone(), type, matchSelf);
1777 return new XPathAncestorIterator(Clone(), name, namespaceURI, matchSelf);
1787 return new XPathDescendantIterator(Clone(), type, matchSelf);
1800 return new XPathDescendantIterator(Clone(), name, namespaceURI, matchSelf);
1867 XmlReader newNode2 = CreateContextReader(newNode, fromCurrentNode:
false);
1880 if (newNode ==
null)
1890 BuildSubtree(newNode, xmlWriter);
1902 if (newNode ==
null)
1906 XmlReader newNode2 = newNode.CreateReader();
1918 XmlReader newChild2 = CreateContextReader(newChild, fromCurrentNode:
true);
1931 if (newChild ==
null)
1936 BuildSubtree(newChild, xmlWriter);
1947 if (newChild ==
null)
1951 if (!IsValidChildType(newChild.
NodeType))
1955 XmlReader newChild2 = newChild.CreateReader();
1967 XmlReader newChild2 = CreateContextReader(newChild, fromCurrentNode:
true);
1980 if (newChild ==
null)
1985 BuildSubtree(newChild, xmlWriter);
1996 if (newChild ==
null)
2000 if (!IsValidChildType(newChild.
NodeType))
2004 XmlReader newChild2 = newChild.CreateReader();
2016 XmlReader newSibling2 = CreateContextReader(newSibling, fromCurrentNode:
false);
2029 if (newSibling ==
null)
2034 BuildSubtree(newSibling, xmlWriter);
2045 if (newSibling ==
null)
2049 if (!IsValidSiblingType(newSibling.
NodeType))
2053 XmlReader newSibling2 = newSibling.CreateReader();
2065 XmlReader newSibling2 = CreateContextReader(newSibling, fromCurrentNode:
false);
2078 if (newSibling ==
null)
2083 BuildSubtree(newSibling, xmlWriter);
2094 if (newSibling ==
null)
2098 if (!IsValidSiblingType(newSibling.
NodeType))
2102 XmlReader newSibling2 = newSibling.CreateReader();
2150 public virtual void AppendChildElement(
string prefix,
string localName,
string namespaceURI,
string value)
2188 public virtual void InsertElementAfter(
string prefix,
string localName,
string namespaceURI,
string value)
2207 public virtual void CreateAttribute(
string prefix,
string localName,
string namespaceURI,
string value)
2219 internal bool MoveToPrevious(
string localName,
string namespaceURI)
2222 localName = ((localName !=
null) ?
NameTable.
Get(localName) :
null);
2236 XPathNavigator other = Clone();
2237 int contentKindMask = GetContentKindMask(type);
2240 if (((1 << (
int)
NodeType) & contentKindMask) != 0)
2249 internal bool MoveToNonDescendant()
2259 XPathNavigator xPathNavigator = Clone();
2280 private static XPathExpression CompileMatchPattern(
string xpath)
2283 Query query =
new QueryBuilder().BuildPatternQuery(xpath, out needContext);
2284 return new CompiledXpathExpr(query, xpath, needContext);
2287 private static int GetDepth(XPathNavigator nav)
2290 while (nav.MoveToParent())
2297 private XmlNodeOrder CompareSiblings(XPathNavigator n1, XPathNavigator n2)
2300 switch (n1.NodeType)
2311 switch (n2.NodeType)
2318 while (n1.MoveToNextNamespace())
2320 if (n1.IsSamePosition(n2))
2332 while (n1.MoveToNextAttribute())
2334 if (n1.IsSamePosition(n2))
2346 while (n1.MoveToNext())
2348 if (n1.IsSamePosition(n2))
2362 internal static XmlNamespaceManager GetNamespaces(IXmlNamespaceResolver resolver)
2364 XmlNamespaceManager xmlNamespaceManager =
new XmlNamespaceManager(
new NameTable());
2368 if (item.Key !=
"xmlns")
2370 xmlNamespaceManager.AddNamespace(item.Key, item.Value);
2373 return xmlNamespaceManager;
2378 return ContentKindMasks[(int)type];
2386 return int.MaxValue;
2390 return 1 << (int)type;
2396 return (uint)(type - 4) <= 2u;
2455 private XmlReader CreateReader()
2457 return XPathNavigatorReader.Create(
this);
2460 private XmlReader CreateContextReader(
string xml,
bool fromCurrentNode)
2464 throw new ArgumentNullException(
"xml");
2467 XmlNamespaceManager xmlNamespaceManager =
new XmlNamespaceManager(
NameTable);
2468 if (!fromCurrentNode)
2470 xPathNavigator.MoveToParent();
2476 xmlNamespaceManager.AddNamespace(xPathNavigator.LocalName, xPathNavigator.Value);
2480 XmlParserContext context =
new XmlParserContext(
NameTable, xmlNamespaceManager,
null,
XmlSpace.Default);
2481 XmlTextReader xmlTextReader =
new XmlTextReader(xml,
XmlNodeType.Element, context);
2483 return xmlTextReader;
2486 internal void BuildSubtree(XmlReader reader, XmlWriter writer)
2488 string text =
"http://www.w3.org/2000/xmlns/";
2490 if (readState != 0 && readState !=
ReadState.Interactive)
2492 throw new ArgumentException(Res.GetString(
"Xml_InvalidOperation"),
"reader");
2505 switch (reader.NodeType)
2509 writer.WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
2510 bool isEmptyElement = reader.IsEmptyElement;
2511 while (reader.MoveToNextAttribute())
2513 if ((
object)reader.NamespaceURI == text)
2515 if (reader.Prefix.Length == 0)
2517 writer.WriteAttributeString(
"",
"xmlns", text, reader.Value);
2521 writer.WriteAttributeString(
"xmlns", reader.LocalName, text, reader.Value);
2526 writer.WriteStartAttribute(reader.Prefix, reader.LocalName, reader.NamespaceURI);
2527 writer.WriteString(reader.Value);
2528 writer.WriteEndAttribute();
2531 reader.MoveToElement();
2534 writer.WriteEndElement();
2543 writer.WriteFullEndElement();
2548 writer.WriteString(reader.Value);
2552 writer.WriteString(reader.Value);
2555 writer.WriteComment(reader.Value);
2558 writer.WriteProcessingInstruction(reader.LocalName, reader.Value);
2561 reader.ResolveEntity();
2564 if ((
object)reader.NamespaceURI == text)
2566 if (reader.Prefix.Length == 0)
2568 writer.WriteAttributeString(
"",
"xmlns", text, reader.Value);
2572 writer.WriteAttributeString(
"xmlns", reader.LocalName, text, reader.Value);
2577 writer.WriteStartAttribute(reader.Prefix, reader.LocalName, reader.NamespaceURI);
2578 writer.WriteString(reader.Value);
2579 writer.WriteEndAttribute();
2584 while (reader.Read() && num > 0);
virtual XPathNodeIterator Select(string xpath)
Selects a node set, using the specified XPath expression.
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
override string ToString()
Gets the text value of the current node.
abstract bool MoveToNextNamespace(XPathNamespaceScope namespaceScope)
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the next namespace...
virtual void WriteSubtree(XmlWriter writer)
Streams the current node and its child nodes to the T:System.Xml.XmlWriter object specified.
virtual XPathNodeIterator Select(XPathExpression expr)
Selects a node set using the specified T:System.Xml.XPath.XPathExpression.
object Clone()
Creates a new object that is a copy of the current instance.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
The base class for all simple types and complex types.
The T:System.Xml.Schema.XmlSchemaDatatype class is an abstract class for mapping XML Schema definitio...
virtual XmlWriter InsertBefore()
Returns an T:System.Xml.XmlWriter object used to create a new sibling node before the currently selec...
XPathNamespaceScope
Defines the namespace scope.
abstract string NamespaceURI
When overridden in a derived class, gets the namespace URI of the current node.
Defines the post-schema-validation infoset of a validated XML node.
virtual bool MoveToNext(XPathNodeType type)
Moves the T:System.Xml.XPath.XPathNavigator to the next sibling node of the current node that matches...
XmlSchemaSimpleType MemberType
Gets the dynamic schema type for this validated XML node.
bool OmitXmlDeclaration
Gets or sets a value indicating whether to omit an XML declaration.
virtual void DeleteSelf()
Deletes the current node and its child nodes.
virtual XmlWriter InsertAfter()
Returns an T:System.Xml.XmlWriter object used to create a new sibling node after the currently select...
unsafe override string ToString()
Converts the value of this instance to a T:System.String.
virtual void ReplaceSelf(string newNode)
Replaces the current node with the content of the string specified.
static XmlWriter Create(string outputFileName)
Creates a new T:System.Xml.XmlWriter instance using the specified filename.
virtual bool MoveToFirst()
Moves the T:System.Xml.XPath.XPathNavigator to the first sibling node of the current node.
Implements a T:System.IO.TextWriter for writing information to a string. The information is stored in...
abstract bool MoveToNext()
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the next sibling n...
static IEqualityComparer NavigatorComparer
Gets an T:System.Collections.IEqualityComparer used for equality comparison of T:System....
virtual XPathNavigator SelectSingleNode(string xpath, IXmlNamespaceResolver resolver)
Selects a single node in the T:System.Xml.XPath.XPathNavigator object using the specified XPath query...
bool? Indent
Gets or sets a value indicating whether to indent elements.
virtual void AppendChildElement(string prefix, string localName, string namespaceURI, string value)
Creates a new child element node at the end of the list of child nodes of the current node using the ...
abstract bool MoveToNextAttribute()
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the next attribute...
XmlSeverityType
Represents the severity of the validation event.
virtual XPathNodeIterator SelectAncestors(XPathNodeType type, bool matchSelf)
Selects all the ancestor nodes of the current node that have a matching T:System.Xml....
XmlSchemaDatatype Datatype
Gets the post-compilation value for the data type of the complex type.
virtual XPathNavigator SelectSingleNode(string xpath)
Selects a single node in the T:System.Xml.XPath.XPathNavigator using the specified XPath query.
virtual bool MoveToNext(string localName, string namespaceURI)
Moves the T:System.Xml.XPath.XPathNavigator to the next sibling node with the local name and namespac...
bool MoveToFirstNamespace()
Moves the T:System.Xml.XPath.XPathNavigator to first namespace node of the current node.
virtual void CreateAttribute(string prefix, string localName, string namespaceURI, string value)
Creates an attribute node on the current element node using the namespace prefix, local name and name...
abstract void WriteEndAttribute()
When overridden in a derived class, closes the previous M:System.Xml.XmlWriter.WriteStartAttribute(Sy...
virtual void PrependChild(XmlReader newChild)
Creates a new child node at the beginning of the list of child nodes of the current node using the XM...
virtual bool Matches(XPathExpression expr)
Determines whether the current node matches the specified T:System.Xml.XPath.XPathExpression.
virtual XPathNodeIterator SelectDescendants(XPathNodeType type, bool matchSelf)
Selects all the descendant nodes of the current node that have a matching T:System....
void WriteStartAttribute(string localName, string ns)
Writes the start of an attribute with the specified local name and namespace URI.
ValidationType
Specifies the type of validation to perform.
Represents an instant in time, typically expressed as a date and time of day. To browse the ....
override object TypedValue
Gets the current node as a boxed object of the most appropriate .NET Framework type.
virtual bool CanEdit
Gets a value indicating whether the T:System.Xml.XPath.XPathNavigator can edit the underlying XML dat...
XmlNodeType
Specifies the type of node.
virtual string LookupPrefix(string namespaceURI)
Gets the prefix declared for the specified namespace URI.
abstract void WriteString(string text)
When overridden in a derived class, writes the given text content.
XPathNodeType
Defines the XPath node types that can be returned from the T:System.Xml.XPath.XPathNavigator class.
virtual XPathNodeIterator SelectAncestors(string name, string namespaceURI, bool matchSelf)
Selects all the ancestor nodes of the current node that have the specified local name and namespace U...
virtual void AppendChild(string newChild)
Creates a new child node at the end of the list of child nodes of the current node using the XML data...
virtual void ReplaceSelf(XPathNavigator newNode)
Replaces the current node with the contents of the T:System.Xml.XPath.XPathNavigator object specified...
XmlNodeOrder
Describes the document order of a node compared to a second node.
XmlSchemaValidity Validity
Gets the T:System.Xml.Schema.XmlSchemaValidity value of this validated XML node.
override bool ValueAsBoolean
Gets the current node's value as a T:System.Boolean.
WhitespaceHandling
Specifies how white space is handled.
virtual void SetTypedValue(object typedValue)
Sets the typed value of the current node.
Represents a writer that provides a fast, non-cached, forward-only way to generate streams or files t...
virtual object Evaluate(XPathExpression expr, XPathNodeIterator context)
Uses the supplied context to evaluate the T:System.Xml.XPath.XPathExpression, and returns the typed r...
XmlNamespaceScope
Defines the namespace scope.
virtual XPathNavigator SelectSingleNode(XPathExpression expression)
Selects a single node in the T:System.Xml.XPath.XPathNavigator using the specified T:System....
Represents an item in the XQuery 1.0 and XPath 2.0 Data Model.
abstract XPathNodeType NodeType
When overridden in a derived class, gets the T:System.Xml.XPath.XPathNodeType of the current node.
Represents a reader that provides fast, noncached, forward-only access to XML data....
virtual void SetValue(string value)
Sets the value of the current node.
virtual bool MoveToFollowing(XPathNodeType type, XPathNavigator end)
Moves the T:System.Xml.XPath.XPathNavigator to the following element of the T:System....
abstract bool MoveNext()
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator object returned by th...
Defines a key/value pair that can be set or retrieved.
virtual bool MoveToFollowing(XPathNodeType type)
Moves the T:System.Xml.XPath.XPathNavigator to the following element of the T:System....
abstract XmlNameTable NameTable
When overridden in a derived class, gets the T:System.Xml.XmlNameTable of the T:System....
Provides an accessor to the T:System.Xml.XPath.XPathNavigator class.
Implements a single-threaded T:System.Xml.XmlNameTable.
override double ValueAsDouble
Gets the current node's value as a T:System.Double.
abstract string Prefix
When overridden in a derived class, gets the namespace prefix associated with the current node.
internal void SetSourceObject(object sourceObject)
Sets the XML node that causes the error.
StringBuilder Append(char value, int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to this inst...
override string ToString()
Returns a string containing the characters written to the current StringWriter so far.
XmlSeverityType Severity
Gets the severity of the validation event.
delegate void ValidationEventHandler(object sender, ValidationEventArgs e)
Represents the callback method that will handle XML schema validation events and the T:System....
ConformanceLevel ConformanceLevel
Gets or sets the level of conformance that the XML writer checks the XML output for.
Provides an iterator over a selected set of nodes.
virtual XmlWriter AppendChild()
Returns an T:System.Xml.XmlWriter object used to create one or more new child nodes at the end of the...
XmlSchemaValidity
Represents the validity of an XML item validated by the T:System.Xml.Schema.XmlSchemaValidator class.
ConformanceLevel
Specifies the amount of input or output checking that T:System.Xml.XmlReader and T:System....
override long ValueAsLong
Gets the current node's value as an T:System.Int64.
virtual IDictionary< string, string > GetNamespacesInScope(XmlNamespaceScope scope)
Returns the in-scope namespaces of the current node.
abstract bool MoveToFirstNamespace(XPathNamespaceScope namespaceScope)
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the first namespac...
override object ValueAs(Type returnType, IXmlNamespaceResolver nsResolver)
Gets the current node's value as the T:System.Type specified, using the T:System.Xml....
Provides a typed class that represents a compiled XPath expression.
Defines methods to support the comparison of objects for equality.
sealed override bool IsNode
Gets a value indicating if the current node represents an XPath node.
virtual XPathNodeIterator SelectChildren(string name, string namespaceURI)
Selects all the child nodes of the current node that have the local name and namespace URI specified.
bool MoveToNextNamespace()
Moves the T:System.Xml.XPath.XPathNavigator to the next namespace node.
abstract bool IsEmptyElement
When overridden in a derived class, gets a value indicating whether the current node is an empty elem...
abstract string Name
When overridden in a derived class, gets the qualified name of the current node.
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
virtual void DeleteRange(XPathNavigator lastSiblingToDelete)
Deletes a range of sibling nodes from the current node to the node specified.
virtual void ReplaceSelf(XmlReader newNode)
Replaces the current node with the contents of the T:System.Xml.XmlReader object specified.
virtual object Evaluate(string xpath)
Evaluates the specified XPath expression and returns the typed result.
Represents type declarations: class types, interface types, array types, value types,...
virtual string GetNamespace(string name)
Returns the value of the namespace node corresponding to the specified local name.
virtual void InsertElementAfter(string prefix, string localName, string namespaceURI, string value)
Creates a new sibling element after the current node using the namespace prefix, local name and names...
abstract Type ValueType
When overridden in a derived class, gets the Common Language Runtime (CLR) type of the item.
Provides the exception thrown when an error occurs while processing an XPath expression.
virtual void AppendChild(XPathNavigator newChild)
Creates a new child node at the end of the list of child nodes of the current node using the nodes in...
abstract void WriteEndElement()
When overridden in a derived class, closes one element and pops the corresponding namespace scope.
virtual void PrependChildElement(string prefix, string localName, string namespaceURI, string value)
Creates a new child element at the beginning of the list of child nodes of the current node using the...
virtual object UnderlyingObject
Used by T:System.Xml.XPath.XPathNavigator implementations which provide a "virtualized" XML view over...
Table of atomized string objects.
static XPathExpression Compile(string xpath)
Compiles the XPath expression specified and returns an T:System.Xml.XPath.XPathExpression object repr...
virtual string GetAttribute(string localName, string namespaceURI)
Gets the value of the attribute with the specified local name and namespace URI.
virtual XPathNodeIterator SelectDescendants(string name, string namespaceURI, bool matchSelf)
Selects all the descendant nodes of the current node with the local name and namespace URI specified.
virtual XmlWriter PrependChild()
Returns an T:System.Xml.XmlWriter object used to create a new child node at the beginning of the list...
ReadState
Specifies the state of the reader.
Specifies a set of features to support on the T:System.Xml.XmlWriter object created by the Overload:S...
virtual void PrependChild(XPathNavigator newChild)
Creates a new child node at the beginning of the list of child nodes of the current node using the no...
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
virtual bool Matches(string xpath)
Determines whether the current node matches the specified XPath expression.
virtual string OuterXml
Gets or sets the markup representing the opening and closing tags of the current node and its child n...
virtual object Evaluate(string xpath, IXmlNamespaceResolver resolver)
Evaluates the specified XPath expression and returns the typed result, using the T:System....
virtual void PrependChild(string newChild)
Creates a new child node at the beginning of the list of child nodes of the current node using the XM...
abstract bool IsSamePosition(XPathNavigator other)
When overridden in a derived class, determines whether the current T:System.Xml.XPath....
virtual void InsertAfter(XmlReader newSibling)
Creates a new sibling node after the currently selected node using the XML contents of the T:System....
virtual IXmlSchemaInfo SchemaInfo
Gets the schema information that has been assigned to the current node as a result of schema validati...
virtual void InsertAfter(XPathNavigator newSibling)
Creates a new sibling node after the currently selected node using the nodes in the T:System....
abstract bool Read()
When overridden in a derived class, reads the next node from the stream.
virtual void Close()
When overridden in a derived class, closes this stream and the underlying stream.
abstract bool MoveToFirstChild()
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the first child no...
virtual bool HasChildren
Gets a value indicating whether the current node has any child nodes.
abstract XPathNavigator Current
When overridden in a derived class, gets the T:System.Xml.XPath.XPathNavigator object for this T:Syst...
virtual string LookupNamespace(string prefix)
Gets the namespace URI for the specified prefix.
Represents the element element from XML Schema as specified by the World Wide Web Consortium (W3C)....
virtual void InsertBefore(XPathNavigator newSibling)
Creates a new sibling node before the currently selected node using the nodes in the T:System....
virtual void WriteNode(XmlReader reader, bool defattr)
When overridden in a derived class, copies everything from the reader to the writer and moves the rea...
virtual bool MoveToNamespace(string name)
Moves the T:System.Xml.XPath.XPathNavigator to the namespace node with the specified namespace prefix...
virtual void InsertBefore(string newSibling)
Creates a new sibling node before the currently selected node using the XML string specified.
virtual bool MoveToChild(string localName, string namespaceURI)
Moves the T:System.Xml.XPath.XPathNavigator to the child node with the local name and namespace URI s...
Provides read-only access to a set of prefix and namespace mappings.
virtual bool MoveToChild(XPathNodeType type)
Moves the T:System.Xml.XPath.XPathNavigator to the child node of the T:System.Xml....
abstract bool MoveToParent()
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the parent node of...
virtual XmlReader ReadSubtree()
Returns an T:System.Xml.XmlReader object that contains the current node and its child nodes.
Provides a cursor model for navigating and editing XML data.
virtual bool MoveToFollowing(string localName, string namespaceURI, XPathNavigator end)
Moves the T:System.Xml.XPath.XPathNavigator to the element with the local name and namespace URI spec...
virtual XmlNodeOrder ComparePosition(XPathNavigator nav)
Compares the position of the current T:System.Xml.XPath.XPathNavigator with the position of the T:Sys...
ValidationEventHandler ValidationEventHandler
Specifies an event handler for receiving information about XML Schema definition language (XSD) schem...
virtual void InsertAfter(string newSibling)
Creates a new sibling node after the currently selected node using the XML string specified.
XmlSchemaElement SchemaElement
Gets the compiled T:System.Xml.Schema.XmlSchemaElement that corresponds to this validated XML node.
virtual string XmlLang
Gets the xml:lang scope for the current node.
virtual void InsertElementBefore(string prefix, string localName, string namespaceURI, string value)
Creates a new sibling element before the current node using the namespace prefix, local name,...
The exception that is thrown when a method call is invalid for the object's current state.
virtual bool IsDescendant(XPathNavigator nav)
Determines whether the specified T:System.Xml.XPath.XPathNavigator is a descendant of the current T:S...
override string Get(string value)
Gets the atomized string with the specified value.
virtual XPathNodeIterator Select(string xpath, IXmlNamespaceResolver resolver)
Selects a node set using the specified XPath expression with the T:System.Xml.IXmlNamespaceResolver o...
virtual void InsertBefore(XmlReader newSibling)
Creates a new sibling node before the currently selected node using the XML contents of the T:System....
virtual void AppendChild(XmlReader newChild)
Creates a new child node at the end of the list of child nodes of the current node using the XML cont...
abstract bool MoveToFirstAttribute()
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the first attribut...
abstract string Value
When overridden in a derived class, gets the string value of the item.
override DateTime ValueAsDateTime
Gets the current node's value as a T:System.DateTime.
abstract bool MoveToPrevious()
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the previous sibli...
XmlSpace
Specifies the current xml:space scope.
Provides information about a specific culture (called a locale for unmanaged code development)....
The exception that is thrown when an invoked method is not supported, or when there is an attempt to ...
XmlSchemaAttribute SchemaAttribute
Gets the compiled T:System.Xml.Schema.XmlSchemaAttribute that corresponds to this validated XML node.
virtual XmlWriter ReplaceRange(XPathNavigator lastSiblingToReplace)
Replaces a range of sibling nodes from the current node to the node specified.
abstract string BaseURI
When overridden in a derived class, gets the base URI for the current node.
virtual XPathExpression Compile(string xpath)
Compiles a string representing an XPath expression and returns an T:System.Xml.XPath....
XmlSchemaException Exception
Gets the T:System.Xml.Schema.XmlSchemaException associated with the validation event.
virtual XPathNodeIterator SelectChildren(XPathNodeType type)
Selects all the child nodes of the current node that have the matching T:System.Xml....
The P:System.Uri.Query data.
override int ValueAsInt
Gets the current node's value as an T:System.Int32.
abstract bool MoveTo(XPathNavigator other)
When overridden in a derived class, moves the T:System.Xml.XPath.XPathNavigator to the same position ...
override XmlSchemaType XmlType
Gets the T:System.Xml.Schema.XmlSchemaType information for the current node.
abstract string LocalName
When overridden in a derived class, gets the P:System.Xml.XPath.XPathNavigator.Name of the current no...
Returns detailed information related to the ValidationEventHandler.
abstract bool MoveToId(string id)
When overridden in a derived class, moves to the node that has an attribute of type ID whose value ma...
virtual string InnerXml
Gets or sets the markup representing the child nodes of the current node.
Provides the base class for value types.
virtual bool HasAttributes
Gets a value indicating whether the current node has any attributes.
virtual bool MoveToAttribute(string localName, string namespaceURI)
Moves the T:System.Xml.XPath.XPathNavigator to the attribute with the matching local name and namespa...
virtual bool CheckValidity(XmlSchemaSet schemas, ValidationEventHandler validationEventHandler)
Verifies that the XML data in the T:System.Xml.XPath.XPathNavigator conforms to the XML Schema defini...
Represents the attribute element from the XML Schema as specified by the World Wide Web Consortium (W...
virtual XPathNavigator CreateNavigator()
Returns a copy of the T:System.Xml.XPath.XPathNavigator.
abstract object ParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr)
When overridden in a derived class, validates the string specified against a built-in or user-defined...
Represents the exception thrown when XML Schema Definition Language (XSD) schema validation errors an...
virtual object Evaluate(XPathExpression expr)
Evaluates the T:System.Xml.XPath.XPathExpression and returns the typed result.
XmlSchemaType SchemaType
Gets the static XML Schema Definition Language (XSD) schema type of this validated XML node.
virtual void MoveToRoot()
Moves the T:System.Xml.XPath.XPathNavigator to the root node that the current node belongs to.
virtual bool MoveToFollowing(string localName, string namespaceURI)
Moves the T:System.Xml.XPath.XPathNavigator to the element with the local name and namespace URI spec...
virtual XmlWriter CreateAttributes()
Returns an T:System.Xml.XmlWriter object used to create new attributes on the current element.
Encodes and decodes XML names, and provides methods for converting between common language runtime ty...
void WriteStartElement(string localName, string ns)
When overridden in a derived class, writes the specified start tag and associates it with the given n...
Contains a cache of XML Schema definition language (XSD) schemas.