891 references to XPathNodeType
Microsoft.Build.Tasks.Core (2)
XmlPeek.cs (2)
138if (iter.Current.NodeType == XPathNodeType.Attribute 139|| iter.Current.NodeType == XPathNodeType.Text)
netstandard (1)
netstandard.cs (1)
2524[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.XPathNodeType))]
System.Data.Common (67)
System\Xml\DataDocumentXPathNavigator.cs (14)
40public override XPathNodeType NodeType => _curNode.NodeType; 54XPathNodeType xnt = _curNode.NodeType; 55return xnt == XPathNodeType.Element || xnt == XPathNodeType.Root ? _curNode.InnerText : _curNode.Value!; 72if (_curNode.NodeType != XPathNodeType.Element) 84_curNode.NodeType != XPathNodeType.Element ? 88_curNode.NodeType != XPathNodeType.Element ? 92_curNode.NodeType != XPathNodeType.Namespace ? 96_curNode.NodeType != XPathNodeType.Element ? 101_curNode.NodeType != XPathNodeType.Element ? 106_curNode.NodeType != XPathNodeType.Attribute ? 111_curNode.NodeType == XPathNodeType.Attribute ? 115_curNode.NodeType == XPathNodeType.Attribute ? 119_curNode.NodeType == XPathNodeType.Attribute ?
System\Xml\XPathNodePointer.cs (53)
29/*XmlNodeType.Element*/ (int)XPathNodeType.Element, 30/*XmlNodeType.Attribute*/ (int)XPathNodeType.Attribute, 31/*XmlNodeType.Text*/ (int)XPathNodeType.Text, 32/*XmlNodeType.CDATA*/ (int)XPathNodeType.Text, 35/*XmlNodeType.ProcessingInstruction*/ (int)XPathNodeType.ProcessingInstruction, 36/*XmlNodeType.Comment*/ (int)XPathNodeType.Comment, 37/*XmlNodeType.Document*/ (int)XPathNodeType.Root, 39/*XmlNodeType.DocumentFragment*/ (int)XPathNodeType.Root, 41/*XmlNodeType.Whitespace*/ (int)XPathNodeType.Whitespace, 42/*XmlNodeType.SignificantWhitespace*/ (int)XPathNodeType.SignificantWhitespace, 48private XPathNodeType DecideXPNodeTypeForTextNodes(XmlNode node) 52XPathNodeType xnt = XPathNodeType.Whitespace; 61xnt = XPathNodeType.SignificantWhitespace; 65return XPathNodeType.Text; 74private XPathNodeType ConvertNodeType(XmlNode node) 80if (xnt == (int)XPathNodeType.Attribute) 83return XPathNodeType.Namespace; 85return XPathNodeType.Attribute; 88return (XPathNodeType)xnt; 143internal XPathNodeType NodeType 151return XPathNodeType.All; 159return XPathNodeType.Text; 164return XPathNodeType.Namespace; 166return XPathNodeType.Attribute; 170return XPathNodeType.Element; 255XPathNodeType xnt = ConvertNodeType(_node); 256if (xnt == XPathNodeType.Element || xnt == XPathNodeType.Root || xnt == XPathNodeType.Attribute) 693(int)XPathNodeType.Root => 694(xntChildInt == (int)XPathNodeType.Element || 695xntChildInt == (int)XPathNodeType.Comment || 696xntChildInt == (int)XPathNodeType.ProcessingInstruction), 698(int)XPathNodeType.Element => 699(xntChildInt == (int)XPathNodeType.Element || 700xntChildInt == (int)XPathNodeType.Text || 701xntChildInt == (int)XPathNodeType.Comment || 702xntChildInt == (int)XPathNodeType.Whitespace || 703xntChildInt == (int)XPathNodeType.SignificantWhitespace || 704xntChildInt == (int)XPathNodeType.ProcessingInstruction), 716(int)XPathNodeType.Root => c.ColumnMapping == MappingType.Element, 717(int)XPathNodeType.Element => (c.ColumnMapping == MappingType.Element || c.ColumnMapping == MappingType.SimpleContent), 978if (NodeType == XPathNodeType.Namespace) 1014XPathNodeType xnt = ConvertNodeType(node); 1015if (xnt == XPathNodeType.Namespace) 1020if (xnt == XPathNodeType.Attribute) 1095if (NodeType == XPathNodeType.Namespace && other.NodeType == XPathNodeType.Namespace) 1103else if (NodeType == XPathNodeType.Namespace) 1105Debug.Assert(other.NodeType != XPathNodeType.Namespace); 1118else if (other.NodeType == XPathNodeType.Namespace) 1120Debug.Assert(NodeType != XPathNodeType.Namespace);
System.Private.Xml (806)
System\Xml\Cache\XPathDocumentBuilder.cs (29)
26Text = XPathNodeType.Text, 27SignificantWhitespace = XPathNodeType.SignificantWhitespace, 28Whitespace = XPathNodeType.Whitespace, 107idx = NewNode(out page, XPathNodeType.Text, string.Empty, string.Empty, string.Empty, string.Empty); 117_idxParent = NewNode(out _pageParent, XPathNodeType.Root, string.Empty, string.Empty, string.Empty, baseUri); 162AddSibling(XPathNodeType.Element, localName, ns, prefix, baseUri); 214Debug.Assert(_pageParent != null && _pageParent[_idxParent].NodeType == XPathNodeType.Element); 290Debug.Assert(_idxParent == 0 || (_pageParent != null && _pageParent[_idxParent].NodeType == XPathNodeType.Element)); 291Debug.Assert(_idxSibling == 0 || (_pageSibling != null && _pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute)); 300AddSibling(XPathNodeType.Attribute, localName, namespaceName, prefix, string.Empty); 309Debug.Assert(_pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute); 341AddSibling(XPathNodeType.Comment, string.Empty, string.Empty, string.Empty, string.Empty); 361AddSibling(XPathNodeType.ProcessingInstruction, name, string.Empty, string.Empty, baseUri); 447AddSibling(XPathNodeType.Text, string.Empty, string.Empty, string.Empty, string.Empty); 482Debug.Assert(_pageParent != null && _pageParent[_idxParent].NodeType == XPathNodeType.Element); 494Debug.Assert(_idxSibling == 0 || (_pageSibling != null && _pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute)); 497Debug.Assert(_idxParent == 0 || (_pageParent != null && _pageParent[_idxParent].NodeType == XPathNodeType.Element)); 632Debug.Assert(pageElem == null || pageElem[idxElem].NodeType == XPathNodeType.Element); 646pageNode[idxNode].Create(info, XPathNodeType.Namespace, idxElem); 657private int NewNode(out XPathNode[] page, XPathNodeType xptyp, string localName, string namespaceUri, string prefix, string? baseUri) 662Debug.Assert(xptyp != XPathNodeType.Namespace); 730private void AddSibling(XPathNodeType xptyp, string localName, string namespaceUri, string prefix, string? baseUri) 734Debug.Assert(xptyp != XPathNodeType.Root && xptyp != XPathNodeType.Namespace); 779AddSibling((XPathNodeType)textType, string.Empty, string.Empty, string.Empty, string.Empty); 903Debug.Assert((int)XPathNodeType.Text < (int)XPathNodeType.SignificantWhitespace); 904Debug.Assert((int)XPathNodeType.SignificantWhitespace < (int)XPathNodeType.Whitespace);
System\Xml\Cache\XPathDocumentIterator.cs (6)
115private readonly XPathNodeType _typ; 120public XPathDocumentKindChildIterator(XPathDocumentNavigator parent, XPathNodeType typ) : base(parent) 185if (root.NodeType != XPathNodeType.Root) 242private readonly XPathNodeType _typ; 248public XPathDocumentKindDescendantIterator(XPathDocumentNavigator root, XPathNodeType typ, bool matchSelf) : base(root) 254if (root.NodeType != XPathNodeType.Root)
System\Xml\Cache\XPathDocumentNavigator.cs (29)
80case XPathNodeType.Namespace: 81case XPathNodeType.Attribute: 82case XPathNodeType.Comment: 83case XPathNodeType.ProcessingInstruction: 87case XPathNodeType.Text: 97Debug.Assert(_pageCurrent[_idxCurrent].NodeType == XPathNodeType.Text); 120Debug.Assert(page[idx].NodeType == XPathNodeType.Element || page[idx].IsText); 155public override XPathNodeType NodeType 218case XPathNodeType.Element: 219case XPathNodeType.Root: 220case XPathNodeType.ProcessingInstruction: 361if (page[idx].NodeType != XPathNodeType.Namespace) 496Debug.Assert(page[idx].NodeType == XPathNodeType.Element); 572public override bool MoveToChild(XPathNodeType type) 577if (type != XPathNodeType.Text && type != XPathNodeType.All) 595public override bool MoveToNext(XPathNodeType type) 641public override bool MoveToFollowing(XPathNodeType type, XPathNavigator? end) 649if (type == XPathNodeType.Text || type == XPathNodeType.All) 667if (type == XPathNodeType.Text) 692if (page[idx].NodeType == XPathNodeType.Element) 736public override XPathNodeIterator SelectChildren(XPathNodeType type) 757public override XPathNodeIterator SelectDescendants(XPathNodeType type, bool matchSelf) 880XPathNodeType.Namespace => int.MinValue + 1 + XPathNodeHelper.GetLocation(_pageCurrent, _idxCurrent), 883XPathNodeType.Attribute => XPathNodeHelper.GetLocation(_pageCurrent, _idxCurrent), 961if (_idxParent != 0 && NodeType == XPathNodeType.Text) 976if (_idxParent != 0 && NodeType == XPathNodeType.Text) 1015public bool IsKindMatch(XPathNodeType typ)
System\Xml\Cache\XPathNode.cs (13)
63public XPathNodeType NodeType 65get { return (XPathNodeType)(_props & NodeTypeMask); } 225return NodeType == XPathNodeType.Element && 238return NodeType == XPathNodeType.Namespace && localName.Length == 3 && localName == "xml"; 290XPathNodeType xptyp = NodeType; 291return xptyp == XPathNodeType.Attribute || xptyp == XPathNodeType.Namespace; 359public void Create(XPathNodeInfoAtom info, XPathNodeType xptyp, int idxParent) 400Debug.Assert(NodeType == XPathNodeType.Element); 411Debug.Assert(NodeType == XPathNodeType.Element); 420public void SetParentProperties(XPathNodeType xptyp) 422if (xptyp == XPathNodeType.Attribute) 429if (xptyp == XPathNodeType.Element)
System\Xml\Cache\XPathNodeHelper.cs (21)
26Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element); 43if (pageElem[idxElem].NodeType == XPathNodeType.Element) 75Debug.Assert(pageNode[idxNode].NodeType == XPathNodeType.Attribute); 92if (idx != 0 && page![idx].NodeType == XPathNodeType.Attribute) 116while (page[idx].NodeType == XPathNodeType.Attribute) 231if (page[idx].NodeType != XPathNodeType.Attribute) 256public static bool GetContentChild(ref XPathNode[] pageNode, ref int idxNode, XPathNodeType typ) 274if (typ == XPathNodeType.Attribute) 294public static bool GetContentSibling(ref XPathNode[] pageNode, ref int idxNode, XPathNodeType typ) 301if (page[idx].NodeType != XPathNodeType.Attribute) 312Debug.Assert(typ != XPathNodeType.Attribute && typ != XPathNodeType.Namespace); 332Debug.Assert(pageNode[idxNode].NodeType != XPathNodeType.Attribute); 374if (pagePrec[idxPrec].NodeType != XPathNodeType.Attribute) 410while (idx != 0 && page![idx].NodeType == XPathNodeType.Attribute); 431if (page[idx].NodeType == XPathNodeType.Element && (object)page[idx].LocalName == (object?)localName) 522public static bool GetContentFollowing(ref XPathNode[] pageCurrent, ref int idxCurrent, XPathNode[]? pageEnd, int idxEnd, XPathNodeType typ) 528Debug.Assert(typ != XPathNodeType.Text, "Text should be handled by GetTextFollowing in order to take into account collapsed text."); 529Debug.Assert(page[idx].NodeType != XPathNodeType.Attribute, "Current node should never be an attribute or namespace--caller should handle this case."); 598if (page[idx].IsText || (page[idx].NodeType == XPathNodeType.Element && page[idx].HasCollapsedText)) 609if (page[idx].IsText || (page[idx].NodeType == XPathNodeType.Element && page[idx].HasCollapsedText))
System\Xml\Core\XmlWriter.cs (12)
433XPathNodeType nodeType = navigator.NodeType; 437case XPathNodeType.Element: 465case XPathNodeType.Attribute: 468case XPathNodeType.Text: 471case XPathNodeType.SignificantWhitespace: 472case XPathNodeType.Whitespace: 475case XPathNodeType.Root: 478case XPathNodeType.Comment: 481case XPathNodeType.ProcessingInstruction: 484case XPathNodeType.Namespace: 502if (navigator.NodeType == XPathNodeType.Element) 535if (navigator.NodeType == XPathNodeType.Element)
System\Xml\Core\XmlWriterAsync.cs (12)
433XPathNodeType nodeType = navigator.NodeType; 437case XPathNodeType.Element: 465case XPathNodeType.Attribute: 468case XPathNodeType.Text: 471case XPathNodeType.SignificantWhitespace: 472case XPathNodeType.Whitespace: 475case XPathNodeType.Root: 478case XPathNodeType.Comment: 481case XPathNodeType.ProcessingInstruction: 484case XPathNodeType.Namespace: 502if (navigator.NodeType == XPathNodeType.Element) 535if (navigator.NodeType == XPathNodeType.Element)
System\Xml\Dom\DocumentSchemaValidator.cs (1)
141if (nodeToValidate.XPNodeType == XPathNodeType.Namespace) goto default;
System\Xml\Dom\DocumentXPathNavigator.cs (13)
92public override XPathNodeType NodeType 98return (XPathNodeType)_source.XPNodeType; 930public override bool MoveToChild(XPathNodeType type) 1034public override bool MoveToFollowing(XPathNodeType type, XPathNavigator? end) 1142public override bool MoveToNext(XPathNodeType type) 1312if (node1.XPNodeType == XPathNodeType.Attribute) 1314if (node2.XPNodeType == XPathNodeType.Attribute) 1341if (node2.XPNodeType == XPathNodeType.Attribute) 1456Debug.Assert(this.NodeType != XPathNodeType.Attribute && this.NodeType != XPathNodeType.Namespace && this.NodeType != XPathNodeType.All); 1474public override XPathNodeIterator SelectDescendants(XPathNodeType nt, bool includeSelf) 1476if (nt == XPathNodeType.Element)
System\Xml\Dom\XmlAttribute.cs (3)
396internal override XPathNodeType XPNodeType 402return XPathNodeType.Namespace; 404return XPathNodeType.Attribute;
System\Xml\Dom\XmlCDataSection.cs (2)
88internal override XPathNodeType XPNodeType 92return XPathNodeType.Text;
System\Xml\Dom\XmlCharacterData.cs (3)
193internal static bool DecideXPNodeTypeForTextNodes(XmlNode node, ref XPathNodeType xnt) 209xnt = XPathNodeType.SignificantWhitespace; 213xnt = XPathNodeType.Text;
System\Xml\Dom\XmlComment.cs (2)
53internal override XPathNodeType XPNodeType { get { return XPathNodeType.Comment; } }
System\Xml\Dom\XmlDocument.cs (2)
1806internal override XPathNodeType XPNodeType { get { return XPathNodeType.Root; } }
System\Xml\Dom\XmlDocumentFragment.cs (2)
194internal override XPathNodeType XPNodeType { get { return XPathNodeType.Root; } }
System\Xml\Dom\XmlElement.cs (2)
632internal override XPathNodeType XPNodeType { get { return XPathNodeType.Element; } }
System\Xml\Dom\XmlNode.cs (2)
1394internal virtual XPathNodeType XPNodeType 1398return (XPathNodeType)(-1);
System\Xml\Dom\XmlProcessingInstruction.cs (2)
99internal override XPathNodeType XPNodeType => XPathNodeType.ProcessingInstruction;
System\Xml\Dom\XmlSignificantWhiteSpace.cs (3)
104internal override XPathNodeType XPNodeType 108XPathNodeType xnt = XPathNodeType.SignificantWhitespace;
System\Xml\Dom\XmlText.cs (2)
133internal override XPathNodeType XPNodeType 137return XPathNodeType.Text;
System\Xml\Dom\XmlWhitespace.cs (3)
104internal override XPathNodeType XPNodeType 108XPathNodeType xnt = XPathNodeType.Whitespace;
System\Xml\Schema\Asttree.cs (4)
528return ((ast.TypeOfAxis == Axis.AxisType.Child) && (ast.NodeType == XPathNodeType.Element)); 533return ((ast.TypeOfAxis == Axis.AxisType.Attribute) && (ast.NodeType == XPathNodeType.Attribute)); 538return ((ast.TypeOfAxis == Axis.AxisType.DescendantOrSelf) && (ast.NodeType == XPathNodeType.All) && (ast.AbbrAxis)); 543return ((ast.TypeOfAxis == Axis.AxisType.Self) && (ast.NodeType == XPathNodeType.All) && (ast.AbbrAxis));
System\Xml\ValidateNames.cs (12)
429internal static void ValidateNameThrow(string? prefix, string localName, string? ns, XPathNodeType nodeKind, Flags flags) 440internal static bool ValidateName(string? prefix, string localName, string? ns, XPathNodeType nodeKind, Flags flags) 451private static bool ValidateNameInternal(string? prefix, string localName, string? ns, XPathNodeType nodeKind, Flags flags, bool throwOnError) 476case XPathNodeType.Element: 485case XPathNodeType.Attribute: 492goto case XPathNodeType.Element; 494case XPathNodeType.ProcessingInstruction: 519case XPathNodeType.Element: 520case XPathNodeType.Attribute: 521case XPathNodeType.Namespace: 534if (prefix.Length == 0 && nodeKind == XPathNodeType.Attribute) 564case XPathNodeType.ProcessingInstruction:
System\Xml\XPath\Internal\AbsoluteQuery.cs (1)
25if (context != null && context.NodeType == XPathNodeType.Root)
System\Xml\XPath\Internal\AttributeQuery.cs (2)
14public AttributeQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type) : base(qyParent, Name, Prefix, Type) { } 62if (context.NodeType == XPathNodeType.Attribute && matches(context))
System\Xml\XPath\Internal\Axis.cs (4)
15private readonly XPathNodeType _nodeType; 37public Axis(AxisType axisType, AstNode? input, string prefix, string name, XPathNodeType nodetype) 50: this(axisType, input, string.Empty, string.Empty, XPathNodeType.All) 67public XPathNodeType NodeType { get { return _nodeType; } }
System\Xml\XPath\Internal\BaseAxisQuery.cs (7)
18private readonly XPathNodeType _typeTest; 32protected BaseAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) 72protected XPathNodeType TypeTest { get { return _typeTest; } } 81TypeTest == XPathNodeType.All || 82TypeTest == XPathNodeType.Text && (e.NodeType == XPathNodeType.Whitespace || e.NodeType == XPathNodeType.SignificantWhitespace)
System\Xml\XPath\Internal\CacheAxisQuery.cs (1)
15public CacheAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) : base(qyInput, name, prefix, typeTest)
System\Xml\XPath\Internal\CacheChildrenQuery.cs (1)
27public CacheChildrenQuery(Query qyInput, string name, string prefix, XPathNodeType type) : base(qyInput, name, prefix, type)
System\Xml\XPath\Internal\ChildrenQuery.cs (3)
12public ChildrenQuery(Query qyInput, string name, string prefix, XPathNodeType type) : base(qyInput, name, prefix, type) { } 35if (TypeTest == XPathNodeType.ProcessingInstruction) 62if (temp.NodeType != XPathNodeType.Attribute && temp.MoveToParent())
System\Xml\XPath\Internal\DescendantBaseQuery.cs (1)
15public DescendantBaseQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type, bool matchSelf, bool abbrAxis) : base(qyParent, Name, Prefix, Type)
System\Xml\XPath\Internal\DescendantoverDescendantQuery.cs (1)
17public DescendantOverDescendantQuery(Query qyParent, bool matchSelf, string name, string prefix, XPathNodeType typeTest, bool abbrAxis) :
System\Xml\XPath\Internal\DescendantQuery.cs (2)
12internal DescendantQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type, bool matchSelf, bool abbrAxis) 41if (TypeTest == XPathNodeType.ProcessingInstruction)
System\Xml\XPath\Internal\FollowingQuery.cs (3)
14public FollowingQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) : base(qyInput, name, prefix, typeTest) { } 51if (_input!.NodeType == XPathNodeType.Attribute || _input.NodeType == XPathNodeType.Namespace)
System\Xml\XPath\Internal\FollSiblingQuery.cs (1)
16public FollSiblingQuery(Query qyInput, string name, string prefix, XPathNodeType type) : base(qyInput, name, prefix, type)
System\Xml\XPath\Internal\NamespaceQuery.cs (2)
13public NamespaceQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type) : base(qyParent, Name, Prefix, Type) { } 58Debug.Assert(e.NodeType == XPathNodeType.Namespace);
System\Xml\XPath\Internal\NodeFunctions.cs (1)
78if (nav.NodeType != XPathNodeType.Whitespace || _xsltContext.PreserveWhitespace(nav))
System\Xml\XPath\Internal\ParentQuery.cs (1)
10public ParentQuery(Query qyInput, string Name, string Prefix, XPathNodeType Type) : base(qyInput, Name, Prefix, Type) { }
System\Xml\XPath\Internal\PrecedingQuery.cs (4)
26public PrecedingQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) : base(qyInput, name, prefix, typeTest) 60if (last.NodeType == XPathNodeType.Attribute || last.NodeType == XPathNodeType.Namespace) 72_workIterator = last.SelectDescendants(XPathNodeType.All, true);
System\Xml\XPath\Internal\PreSiblingQuery.cs (3)
25public PreSiblingQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest) : base(qyInput, name, prefix, typeTest) { } 57if (input.NodeType == XPathNodeType.Attribute || input.NodeType == XPathNodeType.Namespace)
System\Xml\XPath\Internal\QueryBuilder.cs (4)
76input.TypeOfAxis == Axis.AxisType.DescendantOrSelf && input.NodeType == XPathNodeType.All 191if ((root.NodeType == XPathNodeType.All || root.NodeType == XPathNodeType.Element || root.NodeType == XPathNodeType.Attribute) && root.Prefix.Length == 0)
System\Xml\XPath\Internal\XPathAncestorIterator.cs (1)
10public XPathAncestorIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf) : base(nav, type, matchSelf) { }
System\Xml\XPath\Internal\XPathAncestorQuery.cs (1)
13public XPathAncestorQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest, bool matchSelf) : base(qyInput, name, prefix, typeTest)
System\Xml\XPath\Internal\XPathAxisIterator.cs (7)
12internal XPathNodeType type; 25public XPathAxisIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf) : this(nav, matchSelf) 71type == XPathNodeType.All || 72type == XPathNodeType.Text && ( 73nav.NodeType == XPathNodeType.Whitespace || 74nav.NodeType == XPathNodeType.SignificantWhitespace 81nav.NodeType == XPathNodeType.Element &&
System\Xml\XPath\Internal\XPathChildIterator.cs (1)
10public XPathChildIterator(XPathNavigator nav, XPathNodeType type) : base(nav, type, /*matchSelf:*/false) { }
System\Xml\XPath\Internal\XPathDescendantIterator.cs (1)
12public XPathDescendantIterator(XPathNavigator nav, XPathNodeType type, bool matchSelf) : base(nav, type, matchSelf) { }
System\Xml\XPath\Internal\XPathParser.cs (14)
380XPathNodeType nodeType = ( 381axisType == Axis.AxisType.Attribute ? XPathNodeType.Attribute : 383/* default: */ XPathNodeType.Element 397private Axis ParseNodeTest(AstNode? qyInput, Axis.AxisType axisType, XPathNodeType nodeType) 409_scanner.Name == "comment" ? XPathNodeType.Comment : 410_scanner.Name == "text" ? XPathNodeType.Text : 411_scanner.Name == "node" ? XPathNodeType.All : 412_scanner.Name == "processing-instruction" ? XPathNodeType.ProcessingInstruction : 413/* default: */ XPathNodeType.Root 415Debug.Assert(nodeType != XPathNodeType.Root); 420if (nodeType == XPathNodeType.ProcessingInstruction) 727XPathNodeType nodeType = ( 728axisType == Axis.AxisType.Attribute ? XPathNodeType.Attribute : 729/* default: */ XPathNodeType.Element
System\Xml\XPath\Internal\XPathSelfQuery.cs (1)
10public XPathSelfQuery(Query qyInput, string Name, string Prefix, XPathNodeType Type) : base(qyInput, Name, Prefix, Type) { }
System\Xml\XPath\XPathDocument.cs (3)
385Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element && pageNmsp[idxNmsp].NodeType == XPathNodeType.Namespace); 398Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element);
System\Xml\XPath\XPathNavigator.cs (113)
114case XPathNodeType.Element: 115case XPathNodeType.Attribute: 405if (NodeType != XPathNodeType.Element) 438if (NodeType != XPathNodeType.Element) 471XPathNodeType nt = NodeType; 472if ((nt != XPathNodeType.Element && scope != XmlNamespaceScope.Local) || nt == XPathNodeType.Attribute || nt == XPathNodeType.Namespace) 521public abstract XPathNodeType NodeType { get; } 555case XPathNodeType.Root: 556case XPathNodeType.Element: 674case XPathNodeType.Attribute: 675case XPathNodeType.Namespace: 706if (NodeType == XPathNodeType.Element && localName == LocalName && namespaceURI == NamespaceURI) 716public virtual bool MoveToChild(XPathNodeType type) 747case XPathNodeType.Attribute: 748case XPathNodeType.Namespace: 758case XPathNodeType.Attribute: 759case XPathNodeType.Namespace: 793while (NodeType != XPathNodeType.Element 800public virtual bool MoveToFollowing(XPathNodeType type) 805public virtual bool MoveToFollowing(XPathNodeType type, XPathNavigator? end) 814case XPathNodeType.Attribute: 815case XPathNodeType.Namespace: 825case XPathNodeType.Attribute: 826case XPathNodeType.Namespace: 871if (NodeType == XPathNodeType.Element && localName == LocalName && namespaceURI == NamespaceURI) 878public virtual bool MoveToNext(XPathNodeType type) 994case XPathNodeType.Root: 1001case XPathNodeType.Element: 1018case XPathNodeType.Attribute: 1039Debug.Assert(schemaType != null || this.NodeType == XPathNodeType.Root, "schemaType != null || this.NodeType == XPathNodeType.Root"); 1224public virtual XPathNodeIterator SelectChildren(XPathNodeType type) 1234public virtual XPathNodeIterator SelectAncestors(XPathNodeType type, bool matchSelf) 1244public virtual XPathNodeIterator SelectDescendants(XPathNodeType type, bool matchSelf) 1302XPathNodeType type = NodeType; 1303if (type == XPathNodeType.Root 1304|| type == XPathNodeType.Attribute 1305|| type == XPathNodeType.Namespace) 1332if (NodeType == XPathNodeType.Attribute) 1336else if (NodeType == XPathNodeType.Namespace) 1377case XPathNodeType.Root: 1378case XPathNodeType.Element: 1410case XPathNodeType.Attribute: 1411case XPathNodeType.Namespace: 1424case XPathNodeType.Root: 1425case XPathNodeType.Element: 1436case XPathNodeType.Attribute: 1634if (NodeType == XPathNodeType.Element && atomizedLocalName == LocalName && namespaceURI == NamespaceURI) 1642internal bool MoveToPrevious(XPathNodeType type) 1660if (NodeType == XPathNodeType.Root) 1675case XPathNodeType.Attribute: 1676case XPathNodeType.Namespace: 1710case XPathNodeType.Attribute: 1716case XPathNodeType.Namespace: 1827case XPathNodeType.Namespace: 1829case XPathNodeType.Attribute: 1838case XPathNodeType.Namespace: 1850case XPathNodeType.Attribute: 1895internal const int NoAttrNmspMask = AllMask & ~(1 << (int)XPathNodeType.Attribute) & ~(1 << (int)XPathNodeType.Namespace); 1896internal const int TextMask = (1 << (int)XPathNodeType.Text) | (1 << (int)XPathNodeType.SignificantWhitespace) | (1 << (int)XPathNodeType.Whitespace); 1898(1 << (int) XPathNodeType.Root), // Root 1899(1 << (int) XPathNodeType.Element), // Element 1903(1 << (int) XPathNodeType.SignificantWhitespace), // SignificantWhitespace 1904(1 << (int) XPathNodeType.Whitespace), // Whitespace 1905(1 << (int) XPathNodeType.ProcessingInstruction), // ProcessingInstruction 1906(1 << (int) XPathNodeType.Comment), // Comment 1910internal static int GetContentKindMask(XPathNodeType type) 1915internal static int GetKindMask(XPathNodeType type) 1917if (type == XPathNodeType.All) 1919else if (type == XPathNodeType.Text) 1925internal static bool IsText(XPathNodeType type) 1928return unchecked((uint)(type - XPathNodeType.Text)) <= (XPathNodeType.Whitespace - XPathNodeType.Text); 1932private bool IsValidChildType(XPathNodeType type) 1936case XPathNodeType.Root: 1939case XPathNodeType.Element: 1940case XPathNodeType.SignificantWhitespace: 1941case XPathNodeType.Whitespace: 1942case XPathNodeType.ProcessingInstruction: 1943case XPathNodeType.Comment: 1947case XPathNodeType.Element: 1950case XPathNodeType.Element: 1951case XPathNodeType.Text: 1952case XPathNodeType.SignificantWhitespace: 1953case XPathNodeType.Whitespace: 1954case XPathNodeType.ProcessingInstruction: 1955case XPathNodeType.Comment: 1964private bool IsValidSiblingType(XPathNodeType type) 1968case XPathNodeType.Element: 1969case XPathNodeType.Text: 1970case XPathNodeType.SignificantWhitespace: 1971case XPathNodeType.Whitespace: 1972case XPathNodeType.ProcessingInstruction: 1973case XPathNodeType.Comment: 1976case XPathNodeType.Element: 1977case XPathNodeType.Text: 1978case XPathNodeType.SignificantWhitespace: 1979case XPathNodeType.Whitespace: 1980case XPathNodeType.ProcessingInstruction: 1981case XPathNodeType.Comment: 2152case XPathNodeType.Element: 2155case XPathNodeType.Attribute: 2156case XPathNodeType.Namespace: 2157case XPathNodeType.ProcessingInstruction: 2161case XPathNodeType.Text: 2162case XPathNodeType.Whitespace: 2163case XPathNodeType.SignificantWhitespace: 2164case XPathNodeType.Comment:
System\Xml\XPath\XPathNavigatorReader.cs (15)
64internal static XmlNodeType ToXmlNodeType(XPathNodeType typ) 203if (_nav.NodeType == XPathNodeType.Namespace) 217if (_nav.NodeType == XPathNodeType.Namespace && _nav.LocalName.Length == 0) 231if (_nav.NodeType == XPathNodeType.Namespace && _nav.LocalName.Length != 0) 420case XPathNodeType.Element: 422case XPathNodeType.Attribute: 467case XPathNodeType.Element: 469case XPathNodeType.Attribute: 637if (XPathNodeType.Attribute == _nav.NodeType) 641Debug.Assert(XPathNodeType.Namespace == _nav.NodeType); 982if (XPathNodeType.Root == _nav.NodeType) 991else if (XPathNodeType.Attribute == _nav.NodeType) 1028Debug.Assert(_nav.NodeType == XPathNodeType.Element, $"{_nav.NodeType} == XPathNodeType.Element"); 1158public override XPathNodeType NodeType 1160get { return XPathNodeType.All; }
System\Xml\Xsl\IlGen\GenerateHelper.cs (2)
1083public void CallGetTypeFilter(XPathNodeType nodeType) 1154public void CallStartTree(XPathNodeType rootType)
System\Xml\Xsl\IlGen\XmlILConstructAnalyzer.cs (4)
1040XPathNodeType nodeType; 1051nodeType = (nd.NodeType == QilNodeType.ElementCtor) ? XPathNodeType.Element : XPathNodeType.Attribute; 1062nodeType = XPathNodeType.Namespace;
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (40)
2801nameType = LoadNameAndType(XPathNodeType.Element, ndElem.Left, true, callChk); 2812nameType = LoadNameAndType(XPathNodeType.Element, ndElem.Left, false, callChk); 2843nameType = LoadNameAndType(XPathNodeType.Attribute, ndAttr.Left, true, callChk); 3237XPathNodeType kindsRuntime; 3277case XmlNodeKindFlags.Element: kindsRuntime = XPathNodeType.Element; break; 3278case XmlNodeKindFlags.Attribute: kindsRuntime = XPathNodeType.Attribute; break; 3279case XmlNodeKindFlags.Namespace: kindsRuntime = XPathNodeType.Namespace; break; 3280case XmlNodeKindFlags.PI: kindsRuntime = XPathNodeType.ProcessingInstruction; break; 3281case XmlNodeKindFlags.Comment: kindsRuntime = XPathNodeType.Comment; break; 3282case XmlNodeKindFlags.Document: kindsRuntime = XPathNodeType.Root; break; 3289kindsRuntime = XPathNodeType.All; 3297if (kindsRuntime == XPathNodeType.All) 3303if ((kinds & XmlNodeKindFlags.Document) != 0) kindsUnion |= (1 << (int)XPathNodeType.Root); 3304if ((kinds & XmlNodeKindFlags.Element) != 0) kindsUnion |= (1 << (int)XPathNodeType.Element); 3305if ((kinds & XmlNodeKindFlags.Attribute) != 0) kindsUnion |= (1 << (int)XPathNodeType.Attribute); 3307kindsUnion |= (1 << (int)(int)XPathNodeType.Text) | 3308(1 << (int)(int)XPathNodeType.SignificantWhitespace) | 3309(1 << (int)(int)XPathNodeType.Whitespace); 3310if ((kinds & XmlNodeKindFlags.Comment) != 0) kindsUnion |= (1 << (int)XPathNodeType.Comment); 3311if ((kinds & XmlNodeKindFlags.PI) != 0) kindsUnion |= (1 << (int)XPathNodeType.ProcessingInstruction); 3312if ((kinds & XmlNodeKindFlags.Namespace) != 0) kindsUnion |= (1 << (int)XPathNodeType.Namespace); 4100private GenerateNameType LoadNameAndType(XPathNodeType nodeType, QilNode ndName, bool isStart, bool callChk) 4574private static XPathNodeType QilXmlToXPathNodeType(XmlNodeKindFlags xmlTypes) 4578case XmlNodeKindFlags.Element: return XPathNodeType.Element; 4579case XmlNodeKindFlags.Attribute: return XPathNodeType.Attribute; 4580case XmlNodeKindFlags.Text: return XPathNodeType.Text; 4581case XmlNodeKindFlags.Comment: return XPathNodeType.Comment; 4584return XPathNodeType.ProcessingInstruction; 4590private static XPathNodeType QilConstructorToNodeType(QilNodeType typ) 4594case QilNodeType.DocumentCtor: return XPathNodeType.Root; 4595case QilNodeType.ElementCtor: return XPathNodeType.Element; 4596case QilNodeType.TextCtor: return XPathNodeType.Text; 4597case QilNodeType.RawTextCtor: return XPathNodeType.Text; 4598case QilNodeType.PICtor: return XPathNodeType.ProcessingInstruction; 4599case QilNodeType.CommentCtor: return XPathNodeType.Comment; 4600case QilNodeType.AttributeCtor: return XPathNodeType.Attribute; 4601case QilNodeType.NamespaceDecl: return XPathNodeType.Namespace; 4605return XPathNodeType.All; 4630_helper.CallGetTypeFilter(XPathNodeType.All); 4635_helper.CallGetTypeFilter(XPathNodeType.Attribute);
System\Xml\Xsl\Runtime\ContentIterators.cs (4)
107private XPathNodeType _nodeType; 114public void Create(XPathNavigator context, XPathNodeType nodeType) 116Debug.Assert(nodeType != XPathNodeType.Attribute && nodeType != XPathNodeType.Namespace);
System\Xml\Xsl\Runtime\RtfNavigator.cs (2)
47public override XPathNodeType NodeType 49get { return XPathNodeType.Root; }
System\Xml\Xsl\Runtime\TreeIterators.cs (3)
30if (input.NodeType == XPathNodeType.Root) 351if (nav.NodeType == XPathNodeType.Attribute || nav.NodeType == XPathNodeType.Namespace)
System\Xml\Xsl\Runtime\XmlNavigatorFilter.cs (18)
138private readonly XPathNodeType _nodeType; 146var filters = new XmlNavigatorFilter[(int)XPathNodeType.Comment + 1]; 147filters[(int)XPathNodeType.Element] = new XmlNavTypeFilter(XPathNodeType.Element); 148filters[(int)XPathNodeType.Text] = new XmlNavTypeFilter(XPathNodeType.Text); 149filters[(int)XPathNodeType.ProcessingInstruction] = new XmlNavTypeFilter(XPathNodeType.ProcessingInstruction); 150filters[(int)XPathNodeType.Comment] = new XmlNavTypeFilter(XPathNodeType.Comment); 157public static XmlNavigatorFilter Create(XPathNodeType nodeType) 166private XmlNavTypeFilter(XPathNodeType nodeType) 168Debug.Assert(nodeType != XPathNodeType.Attribute && nodeType != XPathNodeType.Namespace); 282return navigator.MoveToFollowing(XPathNodeType.All, navEnd); 290return navigator.NodeType == XPathNodeType.Attribute; 354return navigator.MoveToFollowing(XPathNodeType.All, navEnd); 384if (navigator.NodeType == XPathNodeType.Attribute)
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (78)
53private XPathNodeType _rootType; // NodeType of the root of the tree 78_rootType = XPathNodeType.Root; 163Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Element, ValidateNames.Flags.All), "Name validation failed"); 166ConstructWithinContent(XPathNodeType.Element); 231Debug.Assert(ValidateNames.ValidateName(prefix, localName, ns, XPathNodeType.Attribute, ValidateNames.Flags.All)); 234ConstructInEnumAttrs(XPathNodeType.Attribute); 417public void StartTree(XPathNodeType rootType) 422_xstate = (rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace) ? XmlState.EnumAttrs : XmlState.WithinContent; 597ThrowInvalidStateError(XPathNodeType.Root); 599StartTree(XPathNodeType.Root); 634WriteStartComputed(XPathNodeType.Element, tagName, prefixMappingsIndex); 642WriteStartComputed(XPathNodeType.Element, tagName, ns); 650WriteStartComputed(XPathNodeType.Element, navigator); 658WriteStartComputed(XPathNodeType.Element, name); 666WriteStartComputed(XPathNodeType.Attribute, tagName, prefixMappingsIndex); 674WriteStartComputed(XPathNodeType.Attribute, tagName, ns); 682WriteStartComputed(XPathNodeType.Attribute, navigator); 690WriteStartComputed(XPathNodeType.Attribute, name); 701ConstructInEnumAttrs(XPathNodeType.Namespace); 749ConstructInEnumAttrs(XPathNodeType.Namespace); 789ConstructWithinContent(XPathNodeType.Comment); 827ConstructWithinContent(XPathNodeType.ProcessingInstruction); 830ValidateNames.ValidateNameThrow("", target, "", XPathNodeType.ProcessingInstruction, ValidateNames.Flags.AllExceptPrefixMapping); 904else if (navigator.NodeType == XPathNodeType.Root) 933if (navigator.NodeType == XPathNodeType.Root) 938Debug.Assert(navigator.NodeType == XPathNodeType.Element, "StartCopy should return true only for Element nodes."); 954if (navigator.NodeType == XPathNodeType.Element) 957Debug.Assert(navigator.NodeType == XPathNodeType.Root, "EndCopy should only be called for Element and Document nodes."); 987StartTree(XPathNodeType.Text); 1035XPathNodeType nodeType; 1044Debug.Assert(nodeType == XPathNodeType.Element, "StartCopy should return true only for Element nodes."); 1102case XPathNodeType.Element: 1116case XPathNodeType.Attribute: 1141case XPathNodeType.Namespace: 1158case XPathNodeType.Text: 1159case XPathNodeType.SignificantWhitespace: 1160case XPathNodeType.Whitespace: 1173case XPathNodeType.Root: 1176ThrowInvalidStateError(XPathNodeType.Root); 1179case XPathNodeType.Comment: 1185case XPathNodeType.ProcessingInstruction: 1205Debug.Assert(navigator.NodeType == XPathNodeType.Element); 1219Debug.Assert(navigator.NodeType == XPathNodeType.Element, "Only elements have namespaces to copy"); 1255private void ConstructWithinContent(XPathNodeType rootType) 1257Debug.Assert(rootType == XPathNodeType.Element || rootType == XPathNodeType.Comment || rootType == XPathNodeType.ProcessingInstruction); 1286private void ConstructInEnumAttrs(XPathNodeType rootType) 1288Debug.Assert(rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace); 1329private static XPathNodeType XmlStateToNodeType(XmlState xstate) 1333case XmlState.EnumAttrs: return XPathNodeType.Element; 1334case XmlState.WithinContent: return XPathNodeType.Element; 1335case XmlState.WithinAttr: return XPathNodeType.Attribute; 1336case XmlState.WithinComment: return XPathNodeType.Comment; 1337case XmlState.WithinPI: return XPathNodeType.ProcessingInstruction; 1341return XPathNodeType.Element; 1441private void WriteStartComputed(XPathNodeType nodeType, string tagName, int prefixMappingsIndex) 1451if (nodeType == XPathNodeType.Element) 1460private void WriteStartComputed(XPathNodeType nodeType, string tagName, string ns) 1470if (nodeType == XPathNodeType.Element) 1479private void WriteStartComputed(XPathNodeType nodeType, XPathNavigator navigator) 1493if (nodeType == XPathNodeType.Element) 1502private void WriteStartComputed(XPathNodeType nodeType, XmlQualifiedName name) 1508prefix = (name.Namespace.Length != 0) ? RemapPrefix(string.Empty, name.Namespace, nodeType == XPathNodeType.Element) : string.Empty; 1511if (nodeType == XPathNodeType.Element) 1522private string EnsureValidName(string prefix, string localName, string ns, XPathNodeType nodeType) 1527prefix = (ns.Length != 0) ? RemapPrefix(string.Empty, ns, nodeType == XPathNodeType.Element) : string.Empty; 1564private void ThrowInvalidStateError(XPathNodeType constructorType) 1568case XPathNodeType.Element: 1569case XPathNodeType.Root: 1570case XPathNodeType.Text: 1571case XPathNodeType.Comment: 1572case XPathNodeType.ProcessingInstruction: 1575case XPathNodeType.Attribute: 1576case XPathNodeType.Namespace: 1583goto case XPathNodeType.Element;
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (16)
351public XmlNavigatorFilter GetTypeFilter(XPathNodeType nodeType) 353if (nodeType == XPathNodeType.All) 356if (nodeType == XPathNodeType.Attribute) 765case XPathNodeType.Root: return code == XmlTypeCode.Document; 766case XPathNodeType.Element: return code == XmlTypeCode.Element; 767case XPathNodeType.Attribute: return code == XmlTypeCode.Attribute; 768case XPathNodeType.Namespace: return code == XmlTypeCode.Namespace; 769case XPathNodeType.Text: return code == XmlTypeCode.Text; 770case XPathNodeType.SignificantWhitespace: return code == XmlTypeCode.Text; 771case XPathNodeType.Whitespace: return code == XmlTypeCode.Text; 772case XPathNodeType.ProcessingInstruction: return code == XmlTypeCode.ProcessingInstruction; 773case XPathNodeType.Comment: return code == XmlTypeCode.Comment; 798case XPathNodeType.Root: 799case XPathNodeType.Element: 805case XPathNodeType.Attribute: 1078Debug.Assert(node.NodeType == XPathNodeType.Namespace);
System\Xml\Xsl\Runtime\XmlSequenceWriter.cs (21)
39public abstract XmlRawWriter StartTree(XPathNodeType rootType, IXmlNamespaceResolver? nsResolver, XmlNameTable nameTable); 81public override XmlRawWriter StartTree(XPathNodeType rootType, IXmlNamespaceResolver? nsResolver, XmlNameTable nameTable) 86_writer = _doc.LoadFromWriter(XPathDocument.LoadFlags.AtomizeNames | (rootType == XPathNodeType.Root ? XPathDocument.LoadFlags.None : XPathDocument.LoadFlags.Fragment), string.Empty); 138public override XmlRawWriter StartTree(XPathNodeType rootType, IXmlNamespaceResolver? nsResolver, XmlNameTable nameTable) 140if (rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace) 166if (nav.NodeType == XPathNodeType.Attribute || nav.NodeType == XPathNodeType.Namespace) 201XPathNodeType nodeType; 209if (nodeType == XPathNodeType.Element) 242if (nav.NodeType == XPathNodeType.Element) 267if (nav.NodeType == XPathNodeType.Element) 282case XPathNodeType.Element: 287case XPathNodeType.Attribute: 293case XPathNodeType.Text: 297case XPathNodeType.SignificantWhitespace: 298case XPathNodeType.Whitespace: 302case XPathNodeType.Root: 306case XPathNodeType.Comment: 310case XPathNodeType.ProcessingInstruction: 314case XPathNodeType.Namespace:
System\Xml\Xsl\Runtime\XsltLibrary.cs (10)
526Debug.Assert(XPathNodeType.SignificantWhitespace == XPathNodeType.Text + 1); 527Debug.Assert(XPathNodeType.Whitespace == XPathNodeType.Text + 2); 529XPathNodeType nt1 = nav1.NodeType; 530XPathNodeType nt2 = nav2.NodeType; 533if (XPathNodeType.Text <= nt1 && nt1 <= XPathNodeType.Whitespace) 535return XPathNodeType.Text <= nt2 && nt2 <= XPathNodeType.Whitespace;
System\Xml\Xsl\XmlQueryTypeFactory.cs (1)
1152public static XmlQueryType Type(XPathNodeType kind, XmlQualifiedNameTest nameTest, XmlSchemaType contentType, bool isNillable)
System\Xml\Xsl\XPath\IXpathBuilder.cs (1)
26Node Axis(XPathAxis xpathAxis, XPathNodeType nodeType, string? prefix, string? name);
System\Xml\Xsl\XPath\XPathBuilder.cs (4)
320public static XmlNodeKindFlags AxisTypeMask(XmlNodeKindFlags inputTypeMask, XPathNodeType nodeType, XPathAxis xpathAxis) 328private QilNode BuildAxisFilter(QilNode qilAxis, XPathAxis xpathAxis, XPathNodeType nodeType, string? name, string? nsUri) 390private QilNode BuildAxis(XPathAxis xpathAxis, XPathNodeType nodeType, string? nsUri, string? name) 432public virtual QilNode Axis(XPathAxis xpathAxis, XPathNodeType nodeType, string? prefix, string? name)
System\Xml\Xsl\XPath\XPathParser.cs (19)
6using XPathNodeType = System.Xml.XPath.XPathNodeType; 86Node opnd = _builder!.Axis(XPathAxis.Root, XPathNodeType.All, null, null); 98_builder.Axis(XPathAxis.Root, XPathNodeType.All, null, null), 100_builder.Axis(XPathAxis.DescendantOrSelf, XPathNodeType.All, null, null), 137_builder.Axis(XPathAxis.DescendantOrSelf, XPathNodeType.All, null, null), 155opnd = _builder!.Axis(XPathAxis.Self, XPathNodeType.All, null, null); 164opnd = _builder!.Axis(XPathAxis.Parent, XPathNodeType.All, null, null); 217XPathNodeType nodeType; 238private static XPathNodeType PrincipalNodeType(XPathAxis axis) 241axis == XPathAxis.Attribute ? XPathNodeType.Attribute : 242axis == XPathAxis.Namespace ? XPathNodeType.Namespace : 243/*else*/ XPathNodeType.Element 247internal static void InternalParseNodeTest(XPathScanner scanner, XPathAxis axis, out XPathNodeType nodeType, out string? nodePrefix, out string? nodeName) 258case "comment": nodeType = XPathNodeType.Comment; break; 259case "text": nodeType = XPathNodeType.Text; break; 260case "node": nodeType = XPathNodeType.All; break; 263nodeType = XPathNodeType.ProcessingInstruction; 270if (nodeType == XPathNodeType.ProcessingInstruction) 461_builder.Axis(XPathAxis.DescendantOrSelf, XPathNodeType.All, null, null),
System\Xml\Xsl\Xslt\Compiler.cs (1)
240XPathNodeType.ProcessingInstruction, ValidateNames.Flags.AllExceptPrefixMapping
System\Xml\Xsl\Xslt\XPathPatternBuilder.cs (6)
97private static QilLoop BuildAxisFilter(QilPatternFactory f, QilIterator itr, XPathAxis xpathAxis, XPathNodeType nodeType, string? name, string? nsUri) 120public QilNode Axis(XPathAxis xpathAxis, XPathNodeType nodeType, string? prefix, string? name) 133Debug.Assert(nodeType == XPathNodeType.All && prefix == null && name == null, " // is the only d-o-s axes that we can have in pattern"); 145case XPathNodeType.Element: 146case XPathNodeType.Attribute: 163case XPathNodeType.ProcessingInstruction:
System\Xml\Xsl\Xslt\XPathPatternParser.cs (7)
9using XPathNodeType = System.Xml.XPath.XPathNodeType; 75opnd = _ptrnBuilder!.Axis(XPathAxis.Root, XPathNodeType.All, null, null); 85_ptrnBuilder.Axis(XPathAxis.Root, XPathNodeType.All, null, null), 87_ptrnBuilder.Axis(XPathAxis.DescendantOrSelf, XPathNodeType.All, null, null), 105_ptrnBuilder.Axis(XPathAxis.DescendantOrSelf, XPathNodeType.All, null, null), 181_ptrnBuilder.Axis(XPathAxis.DescendantOrSelf, XPathNodeType.All, null, null), 226XPathNodeType nodeType;
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (2)
1019public XslFlags Axis(XPathAxis xpathAxis, XPathNodeType nodeType, string? prefix, string? name) 1022if (xpathAxis == XPathAxis.Self && nodeType == XPathNodeType.All && prefix == null && name == null)
System\Xml\Xsl\XsltOld\ActionFrame.cs (6)
271XPathNodeType type = _nodeSet.Current!.NodeType; 272if (type == XPathNodeType.Whitespace) 283while (flag && (type == XPathNodeType.Whitespace)); 294XPathNodeType type = _newNodeSet.Current!.NodeType; 295if (type == XPathNodeType.Whitespace) 306while (flag && (type == XPathNodeType.Whitespace));
System\Xml\Xsl\XsltOld\ApplyTemplatesAction.cs (6)
86case XPathNodeType.Element: 115case XPathNodeType.Comment: 116case XPathNodeType.ProcessingInstruction: 117case XPathNodeType.Whitespace: 118case XPathNodeType.SignificantWhitespace: 155frame.InitNewNodeSet(frame.Node.SelectChildren(XPathNodeType.All));
System\Xml\Xsl\XsltOld\AttributeAction.cs (2)
145if (processor.BeginEvent(XPathNodeType.Attribute, qname.Prefix, qname.Name, qname.Namespace, false) == false) 157if (processor.EndEvent(XPathNodeType.Attribute) == false)
System\Xml\Xsl\XsltOld\AttributeSetAction.cs (5)
61case XPathNodeType.Element: 79case XPathNodeType.Comment: 80case XPathNodeType.ProcessingInstruction: 81case XPathNodeType.Whitespace: 82case XPathNodeType.SignificantWhitespace:
System\Xml\Xsl\XsltOld\BeginEvent.cs (5)
13private readonly XPathNodeType _nodeType; 27Debug.Assert(input.NodeType != XPathNodeType.Namespace); 33if (_nodeType == XPathNodeType.Element) 37else if (_nodeType == XPathNodeType.Attribute) 49if (_nodeType == XPathNodeType.Attribute && _namespaceUri.Length == 0)
System\Xml\Xsl\XsltOld\CallTemplateAction.cs (5)
51case XPathNodeType.Element: 68case XPathNodeType.Comment: 69case XPathNodeType.ProcessingInstruction: 70case XPathNodeType.Whitespace: 71case XPathNodeType.SignificantWhitespace:
System\Xml\Xsl\XsltOld\ChooseAction.cs (5)
34case XPathNodeType.Element: 73case XPathNodeType.Comment: 74case XPathNodeType.ProcessingInstruction: 75case XPathNodeType.Whitespace: 76case XPathNodeType.SignificantWhitespace:
System\Xml\Xsl\XsltOld\CommentAction.cs (2)
31if (processor.BeginEvent(XPathNodeType.Comment, string.Empty, string.Empty, string.Empty, false) == false) 42if (processor.EndEvent(XPathNodeType.Comment) == false)
System\Xml\Xsl\XsltOld\CompiledAction.cs (4)
78XPathNodeType nodeType = compiler.Input.NodeType; 80nodeType != XPathNodeType.Whitespace && 81nodeType != XPathNodeType.Comment && 82nodeType != XPathNodeType.ProcessingInstruction
System\Xml\Xsl\XsltOld\ContainerAction.cs (17)
160while (input.NodeType != XPathNodeType.Element) 168Debug.Assert(compiler.Input.NodeType == XPathNodeType.Element); 506case XPathNodeType.Element: 610case XPathNodeType.ProcessingInstruction: 611case XPathNodeType.Comment: 612case XPathNodeType.Whitespace: 613case XPathNodeType.SignificantWhitespace: 638if (input.NodeType == XPathNodeType.Element) 769case XPathNodeType.Element: 779this.AddEvent(new EndEvent(XPathNodeType.Element)); 782case XPathNodeType.Text: 783case XPathNodeType.SignificantWhitespace: 786case XPathNodeType.Whitespace: 787case XPathNodeType.ProcessingInstruction: 788case XPathNodeType.Comment: 845this.AddEvent(new EndEvent(XPathNodeType.Attribute)); 943if (!input.Recurse() || input.NodeType != XPathNodeType.Text)
System\Xml\Xsl\XsltOld\CopyAction.cs (2)
76if (frame.Node!.NodeType == XPathNodeType.Element) 83if (frame.Node!.NodeType == XPathNodeType.Element && !_empty)
System\Xml\Xsl\XsltOld\CopyAttributesAction.cs (9)
46Debug.Assert(frame.Node!.NodeType == XPathNodeType.Attribute); 58Debug.Assert(frame.Node!.NodeType == XPathNodeType.Attribute); 70Debug.Assert(frame.Node!.NodeType == XPathNodeType.Attribute); 82Debug.Assert(frame.Node!.NodeType == XPathNodeType.Attribute); 102Debug.Assert(node.NodeType == XPathNodeType.Attribute); 103return processor.BeginEvent(XPathNodeType.Attribute, node.Prefix, node.LocalName, node.NamespaceURI, false); 108Debug.Assert(node.NodeType == XPathNodeType.Attribute); 114Debug.Assert(node.NodeType == XPathNodeType.Attribute); 115return processor.EndEvent(XPathNodeType.Attribute);
System\Xml\Xsl\XsltOld\CopyNamespacesAction.cs (5)
43Debug.Assert(frame.Node!.NodeType == XPathNodeType.Namespace); 45if (processor.BeginEvent(XPathNodeType.Namespace, null, frame.Node.LocalName, frame.Node.Value, false) == false) 55Debug.Assert(frame.Node!.NodeType == XPathNodeType.Namespace); 57if (processor.EndEvent(XPathNodeType.Namespace) == false) 67Debug.Assert(frame.Node!.NodeType == XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\CopyNodeSetAction.cs (4)
59XPathNodeType nodeType = frame.Node!.NodeType; 61if (nodeType == XPathNodeType.Element || nodeType == XPathNodeType.Root) 84processor.PushActionFrame(GetAction(), frame.Node.SelectChildren(XPathNodeType.All));
System\Xml\Xsl\XsltOld\ElementAction.cs (2)
125if (processor.BeginEvent(XPathNodeType.Element, qname.Prefix, qname.Name, qname.Namespace, _empty) == false) 144if (processor.EndEvent(XPathNodeType.Element) == false)
System\Xml\Xsl\XsltOld\EndEvent.cs (3)
13private readonly XPathNodeType _nodeType; 15internal EndEvent(XPathNodeType nodeType) 17Debug.Assert(nodeType != XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\ForEachAction.cs (3)
110case XPathNodeType.Element: 119case XPathNodeType.Text: 121case XPathNodeType.SignificantWhitespace:
System\Xml\Xsl\XsltOld\NameSpaceEvent.cs (3)
19Debug.Assert(input.NodeType == XPathNodeType.Namespace); 43res = processor.BeginEvent(XPathNodeType.Namespace, /*prefix:*/null, _name, _namespaceUri, /*empty:*/false); 45res = processor.EndEvent(XPathNodeType.Namespace);
System\Xml\Xsl\XsltOld\NavigatorInput.cs (2)
110internal XPathNodeType NodeType 222if (NodeType == XPathNodeType.Root)
System\Xml\Xsl\XsltOld\NumberAction.cs (14)
236if (endNode.NodeType == XPathNodeType.Attribute || endNode.NodeType == XPathNodeType.Namespace) 258startNode.NodeType == XPathNodeType.Root // we are at root 263XPathNodeIterator sel = startNode.SelectDescendants(XPathNodeType.All, /*matchSelf:*/ true); 289XPathNodeIterator sel = startNode.SelectDescendants(XPathNodeType.All, /*matchSelf:*/ true); 342Debug.Assert(nav.NodeType != XPathNodeType.Attribute && nav.NodeType != XPathNodeType.Namespace); 419if (countNode.NodeType == XPathNodeType.Attribute || countNode.NodeType == XPathNodeType.Namespace) 472private static XPathNodeType BasicNodeType(XPathNodeType type) 474if (type == XPathNodeType.SignificantWhitespace || type == XPathNodeType.Whitespace) 476return XPathNodeType.Text;
System\Xml\Xsl\XsltOld\ProcessingInstructionAction.cs (2)
89if (processor.BeginEvent(XPathNodeType.ProcessingInstruction, string.Empty, frame.StoredOutput, string.Empty, false) == false) 100if (processor.EndEvent(XPathNodeType.ProcessingInstruction) == false)
System\Xml\Xsl\XsltOld\Processor.cs (45)
591if (_stylesheet.Whitespace && n.NodeType == XPathNodeType.Element) 603Debug.Assert(nav.NodeType == XPathNodeType.Element); 611case XPathNodeType.Text: 612case XPathNodeType.SignificantWhitespace: 615case XPathNodeType.Whitespace: 621case XPathNodeType.Element: 725internal bool BeginEvent(XPathNodeType nodeType, string? prefix, string? name, string? nspace, bool empty) 730internal bool BeginEvent(XPathNodeType nodeType, string? prefix, string? name, string? nspace, bool empty, object? htmlProps, bool search) 782int stateOutlook = _xsm.BeginOutlook(XPathNodeType.Text); 787_xsm.Begin(XPathNodeType.Text); 792_xsm.Begin(XPathNodeType.Text); 808internal bool EndEvent(XPathNodeType nodeType) 847case XPathNodeType.Element: 848case XPathNodeType.Attribute: 849case XPathNodeType.ProcessingInstruction: 850case XPathNodeType.Comment: 852case XPathNodeType.Namespace: 854return BeginEvent(XPathNodeType.Namespace, null, node.LocalName, node.Value, false); 855case XPathNodeType.Text: 859case XPathNodeType.Root: 860case XPathNodeType.Whitespace: 861case XPathNodeType.SignificantWhitespace: 862case XPathNodeType.All: 877case XPathNodeType.Element: 878case XPathNodeType.Namespace: 881case XPathNodeType.Attribute: 882case XPathNodeType.ProcessingInstruction: 883case XPathNodeType.Comment: 884case XPathNodeType.Text: 885case XPathNodeType.Whitespace: 886case XPathNodeType.SignificantWhitespace: 890case XPathNodeType.Root: 891case XPathNodeType.All: 906case XPathNodeType.Element: 907case XPathNodeType.Attribute: 908case XPathNodeType.ProcessingInstruction: 909case XPathNodeType.Comment: 910case XPathNodeType.Namespace: 913case XPathNodeType.Text: 918case XPathNodeType.Root: 919case XPathNodeType.Whitespace: 920case XPathNodeType.SignificantWhitespace: 921case XPathNodeType.All: 936if (navigator.NodeType == XPathNodeType.Root) 940else if (navigator.NodeType == XPathNodeType.Element)
System\Xml\Xsl\XsltOld\RecordBuilder.cs (13)
127internal Processor.OutputResult BeginEvent(int state, XPathNodeType nodeType, string? prefix, string? name, string? nspace, bool empty, object? htmlProps, bool search) 146case XPathNodeType.Element: 151case XPathNodeType.Attribute: 154case XPathNodeType.Namespace: 157case XPathNodeType.Text: 159case XPathNodeType.ProcessingInstruction: 165case XPathNodeType.Comment: 168case XPathNodeType.Root: 170case XPathNodeType.Whitespace: 171case XPathNodeType.SignificantWhitespace: 172case XPathNodeType.All: 203internal Processor.OutputResult EndEvent(int state, XPathNodeType nodeType) 223if (nodeType == XPathNodeType.Element)
System\Xml\Xsl\XsltOld\StateMachine.cs (4)
97internal int BeginOutlook(XPathNodeType nodeType) 104internal int Begin(XPathNodeType nodeType) 116internal int EndOutlook(XPathNodeType nodeType) 123internal int End(XPathNodeType nodeType)
System\Xml\Xsl\XsltOld\TemplateAction.cs (3)
169case XPathNodeType.Element: 182case XPathNodeType.Text: 184case XPathNodeType.SignificantWhitespace:
System\Xml\Xsl\XsltOld\TemplateLookupAction.cs (9)
67case XPathNodeType.Element: 68case XPathNodeType.Root: 74case XPathNodeType.Attribute: 75case XPathNodeType.Whitespace: 76case XPathNodeType.SignificantWhitespace: 77case XPathNodeType.Text: 81case XPathNodeType.ProcessingInstruction: 82case XPathNodeType.Comment: 85case XPathNodeType.All:
System\Xml\Xsl\XsltOld\TextAction.cs (5)
51case XPathNodeType.Text: 52case XPathNodeType.Whitespace: 53case XPathNodeType.SignificantWhitespace: 56case XPathNodeType.Comment: 57case XPathNodeType.ProcessingInstruction:
System\Xml\Xsl\XsltOld\TextEvent.cs (2)
26Debug.Assert(input.NodeType == XPathNodeType.Text || input.NodeType == XPathNodeType.SignificantWhitespace);
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (1)
301XPathNodeIterator sel = root.SelectDescendants(XPathNodeType.All, /*matchSelf:*/ false);
System.Private.Xml.Linq (12)
System\Xml\XPath\XNodeNavigator.cs (12)
198public override XPathNodeType NodeType 207return XPathNodeType.Element; 210return attribute.IsNamespaceDeclaration ? XPathNodeType.Namespace : XPathNodeType.Attribute; 212return XPathNodeType.Root; 214return XPathNodeType.Comment; 216return XPathNodeType.ProcessingInstruction; 218return XPathNodeType.Text; 221return XPathNodeType.Text; 360public override bool MoveToChild(XPathNodeType type) 536public override bool MoveToNext(XPathNodeType type) 767private static int GetElementContentMask(XPathNodeType type)
System.Xml (1)
System.Xml.cs (1)
186[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.XPathNodeType))]
System.Xml.ReaderWriter (1)
artifacts\obj\System.Xml.ReaderWriter\Debug\net10.0\System.Xml.ReaderWriter.Forwards.cs (1)
177[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.XPathNodeType))]
System.Xml.XPath (1)
artifacts\obj\System.Xml.XPath\Debug\net10.0\System.Xml.XPath.Forwards.cs (1)
15[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XPath.XPathNodeType))]