2917 references to XmlNodeType
Microsoft.AspNetCore.Mvc.Formatters.Xml (3)
ProblemDetailsWrapper.cs (1)
57while (reader.NodeType != XmlNodeType.EndElement)
SerializableErrorWrapper.cs (1)
65while (reader.NodeType != XmlNodeType.EndElement)
ValidationProblemDetailsWrapper.cs (1)
61while (reader.NodeType != XmlNodeType.EndElement)
Microsoft.Build (27)
BackEnd\Components\SdkResolution\SdkResolverManifest.cs (3)
78if (reader.NodeType == XmlNodeType.Element && reader.Name == "SdkResolver") 112case XmlNodeType.Element: 141case XmlNodeType.EndElement:
Construction\ProjectElement.cs (2)
369if (XmlElement.ChildNodes.Count == 1 && XmlElement.FirstChild.NodeType == XmlNodeType.Text) 407if (element.XmlElement.ChildNodes.Count == 1 && element.XmlElement.FirstChild.NodeType == XmlNodeType.Text)
Construction\ProjectElementContainer.cs (6)
530if (referenceSibling.XmlElement.PreviousSibling?.NodeType == XmlNodeType.Whitespace) 546if (child.XmlElement.PreviousSibling?.NodeType == XmlNodeType.Whitespace) 561if (XmlElement.FirstChild.NodeType == XmlNodeType.Whitespace) 580if (xmlElement.PreviousSibling?.NodeType != XmlNodeType.Whitespace) 616if (previousSibling?.NodeType == XmlNodeType.Whitespace) 628if (XmlElement.ChildNodes.Cast<XmlNode>().All(c => c.NodeType == XmlNodeType.Whitespace))
Construction\Solution\ProjectInSolution.cs (1)
318if (childNode.NodeType == XmlNodeType.Element)
Evaluation\Preprocessor.cs (6)
228if (child.NodeType == XmlNodeType.XmlDeclaration) 235child.NodeType == XmlNodeType.Element && 275if (child.NodeType == XmlNodeType.Element && String.Equals(XMakeElements.import, child.Name, StringComparison.Ordinal)) 285string projectSdk = source.NodeType == XmlNodeType.Element && String.Equals(XMakeElements.project, source.Name, StringComparison.Ordinal) ? ((XmlElement)source).GetAttribute(XMakeAttributes.sdk) : String.Empty; 333if (child.NodeType == XmlNodeType.Element && String.Equals(XMakeElements.importGroup, child.Name, StringComparison.Ordinal)) 350if (clone.NodeType == XmlNodeType.Element && String.Equals(XMakeElements.project, child.Name, StringComparison.Ordinal) && clone.Attributes?[XMakeAttributes.sdk] != null)
Evaluation\ProjectParser.cs (1)
632if (childElement.ChildNodes.Count == 1 && childElement.FirstChild.NodeType == XmlNodeType.Text)
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementLink.cs (1)
138if (xml.XmlElement.ChildNodes.Count == 1 && xml.XmlElement.FirstChild.NodeType == XmlNodeType.Text)
SolutionConfiguration.cs (1)
74if (dependencyNode.NodeType != XmlNodeType.Element)
Utilities\Utilities.cs (2)
199if (node.ChildNodes.Count == 1 && (node.FirstChild.NodeType == XmlNodeType.Text || node.FirstChild.NodeType == XmlNodeType.CDATA))
Xml\ProjectXmlUtilities.XmlElementChildIterator.cs (4)
82case XmlNodeType.Comment: 83case XmlNodeType.Whitespace: 87case XmlNodeType.Element: 91if (child.NodeType == XmlNodeType.Text && String.IsNullOrWhiteSpace(child.InnerText))
Microsoft.Build.Engine.UnitTests (1)
Construction\XmlReaderWithoutLocation_Tests.cs (1)
119public override XmlNodeType NodeType
Microsoft.Build.Tasks.Core (27)
AppConfig\AppConfig.cs (1)
84if (reader.NodeType == XmlNodeType.Element && StringEquals(reader.Name, "runtime"))
AppConfig\DependentAssembly.cs (3)
54if (reader.NodeType == XmlNodeType.EndElement && AppConfig.StringEquals(reader.Name, "dependentassembly")) 60if (reader.NodeType == XmlNodeType.Element && AppConfig.StringEquals(reader.Name, "assemblyIdentity")) 104if (reader.NodeType == XmlNodeType.Element && AppConfig.StringEquals(reader.Name, "bindingRedirect"))
AppConfig\RuntimeSection.cs (2)
24if (reader.NodeType == XmlNodeType.EndElement && AppConfig.StringEquals(reader.Name, "runtime")) 30if (reader.NodeType == XmlNodeType.Element && AppConfig.StringEquals(reader.Name, "dependentAssembly"))
BootstrapperUtil\BootstrapperBuilder.cs (1)
1238if (nextNode.NodeType == XmlNodeType.Element)
ManifestUtil\ManifestFormatter.cs (5)
40case XmlNodeType.Element: 79case XmlNodeType.EndElement: 83case XmlNodeType.Comment: 87case XmlNodeType.CDATA: 91case XmlNodeType.Text:
ManifestUtil\ManifestReader.cs (1)
236} while (r.NodeType != XmlNodeType.Element);
ManifestUtil\TrustInfo.cs (2)
123permissionSetElement.ParentNode.NodeType == XmlNodeType.Document) 268if (previousNode?.NodeType == XmlNodeType.Comment)
ManifestUtil\XmlUtil.cs (2)
49if (node.NodeType == XmlNodeType.Element) 54else if (node.NodeType == XmlNodeType.Comment)
RedistList.cs (6)
669if (reader.NodeType == XmlNodeType.Element) 734if (reader.NodeType == XmlNodeType.Element) 768if (reader.NodeType == XmlNodeType.EndElement && string.Equals(reader.Name, "From", StringComparison.OrdinalIgnoreCase)) 774if (reader.NodeType == XmlNodeType.EndElement && string.Equals(reader.Name, "Remap", StringComparison.OrdinalIgnoreCase)) 788if (reader.NodeType == XmlNodeType.Element) 818if (reader.NodeType == XmlNodeType.EndElement && string.Equals(reader.Name, "FileList", StringComparison.OrdinalIgnoreCase))
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (3)
327.Where(i => i.NodeType != XmlNodeType.Comment && i.NodeType != XmlNodeType.Whitespace)) 331case XmlNodeType.Element:
SolutionConfiguration.cs (1)
74if (dependencyNode.NodeType != XmlNodeType.Element)
Microsoft.Build.Utilities.Core (3)
PlatformManifest.cs (1)
111if (childNode.NodeType == XmlNodeType.Element &&
SDKManifest.cs (1)
330if (childNode.NodeType == XmlNodeType.Element &&
ToolLocationHelper.cs (1)
3137if (reader.NodeType == XmlNodeType.Element)
Microsoft.CodeAnalysis (3)
DocumentationComments\XmlDocumentationCommentTextReader.XmlStream.cs (1)
77&& reader.NodeType == XmlNodeType.EndElement
InternalUtilities\XmlUtilities.cs (2)
22if (node.NodeType == XmlNodeType.Document) 43if (copyAttributeAnnotations && node.NodeType == XmlNodeType.Element)
Microsoft.CodeAnalysis.CSharp (2)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (2)
177if (node.NodeType == XmlNodeType.Element) 213if (container.NodeType == XmlNodeType.Element && originatingSyntax != null)
Microsoft.CodeAnalysis.Features (3)
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (3)
312if (node.NodeType is XmlNodeType.Text or XmlNodeType.CDATA) 318if (node.NodeType != XmlNodeType.Element)
Microsoft.CodeAnalysis.VisualBasic (2)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (2)
272If node.NodeType = XmlNodeType.Element Then 301If container.NodeType = XmlNodeType.Element AndAlso originatingSyntax IsNot Nothing Then
Microsoft.CodeAnalysis.Workspaces (5)
Shared\Extensions\ISymbolExtensions.cs (3)
299if (node.NodeType == XmlNodeType.Element) 569if (node.NodeType == XmlNodeType.Document) 590if (copyAttributeAnnotations && node.NodeType == XmlNodeType.Element)
Shared\Utilities\DocumentationComment.cs (1)
230if (reader.NodeType == XmlNodeType.Element)
Shared\Utilities\XmlFragmentParser.cs (1)
107&& _xmlReader.NodeType == XmlNodeType.EndElement
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\InternalUtilities\XmlUtilities.cs (2)
22if (node.NodeType == XmlNodeType.Document) 43if (copyAttributeAnnotations && node.NodeType == XmlNodeType.Element)
Microsoft.Extensions.Configuration.Xml (12)
XmlStreamConfigurationProvider.cs (12)
56XmlNodeType preNodeType = reader.NodeType; 62case XmlNodeType.Element: 128case XmlNodeType.EndElement: 135if (preNodeType == XmlNodeType.Element) 145case XmlNodeType.CDATA: 146case XmlNodeType.Text: 158case XmlNodeType.XmlDeclaration: 159case XmlNodeType.ProcessingInstruction: 160case XmlNodeType.Comment: 161case XmlNodeType.Whitespace: 173if (preNodeType == XmlNodeType.Element && reader.IsEmptyElement) 175preNodeType = XmlNodeType.EndElement;
Microsoft.Extensions.FileProviders.Embedded (2)
Manifest\ManifestParser.cs (2)
83if (element.NodeType != XmlNodeType.Element) 142element.FirstNode?.NodeType == XmlNodeType.Text)
Microsoft.Maui.Controls.Build.Tasks (4)
XamlTask.cs (4)
50 if (reader.NodeType == XmlNodeType.Whitespace) 52 if (reader.NodeType != XmlNodeType.Element) 80 while (reader.Read() && reader.NodeType != XmlNodeType.Element) 83 if (reader.NodeType != XmlNodeType.Element)
Microsoft.Maui.Controls.Xaml (22)
XamlLoader.cs (9)
68 if (reader.NodeType == XmlNodeType.Whitespace) 70 if (reader.NodeType == XmlNodeType.XmlDeclaration) 72 if (reader.NodeType != XmlNodeType.Element) 110 if (reader.NodeType == XmlNodeType.Whitespace) 112 if (reader.NodeType == XmlNodeType.XmlDeclaration) 114 if (reader.NodeType != XmlNodeType.Element) 151 if (reader.NodeType == XmlNodeType.Whitespace) 153 if (reader.NodeType == XmlNodeType.XmlDeclaration) 155 if (reader.NodeType != XmlNodeType.Element)
XamlParser.cs (13)
54 Debug.Assert(reader.NodeType == XmlNodeType.Element); 66 case XmlNodeType.EndElement: 69 case XmlNodeType.Element: 120 case XmlNodeType.Whitespace: 122 case XmlNodeType.Text: 123 case XmlNodeType.CDATA: 139 Debug.Assert(reader.NodeType == XmlNodeType.Element); 150 case XmlNodeType.EndElement: 158 case XmlNodeType.Element: 179 case XmlNodeType.Text: 180 case XmlNodeType.CDATA: 185 case XmlNodeType.Whitespace: 206 Debug.Assert(reader.NodeType == XmlNodeType.Element);
Microsoft.Maui.Graphics (4)
Text\XmlAttributedTextReader.cs (4)
42 case XmlNodeType.CDATA: 45 case XmlNodeType.Text: 48 case XmlNodeType.Element: 51 case XmlNodeType.EndElement:
netstandard (1)
netstandard.cs (1)
2490[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XmlNodeType))]
PresentationBuildTasks (66)
Microsoft\Build\Tasks\Windows\UidManager.cs (2)
492XmlNodeType.Document, // parsing document 500case XmlNodeType.Element :
MS\Internal\MarkupCompiler\MarkupCompiler.cs (6)
790XmlNodeType currNodeType = xmlReader.NodeType; 793case XmlNodeType.Element: 846case XmlNodeType.EndElement: 853case XmlNodeType.CDATA: 854case XmlNodeType.Text: 869ThrowCompilerException(nameof(SR.IllegalCDataTextScoping), DefinitionNSPrefix, LocalName, (currNodeType == XmlNodeType.CDATA ? "a CDATA section" : "text content"));
MS\Internal\MarkupCompiler\ParserExtension.cs (2)
417string attrName = (xmlReader.NodeType == XmlNodeType.Attribute) ? xmlReader.Name : null; 716while (!xamlDefTagNode.IsEmptyElement && xamlDefTagNode.XmlReader.NodeType != XmlNodeType.EndElement)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (2)
73multipleRoots ? XmlNodeType.Element : XmlNodeType.Document,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (50)
380case XmlNodeType.Element: 383case XmlNodeType.EndElement: 1239case XmlNodeType.SignificantWhitespace: 1240case XmlNodeType.Text: 1241case XmlNodeType.CDATA: 1242case XmlNodeType.Whitespace: 1259case XmlNodeType.Element: 1278case XmlNodeType.EndElement: 1306case XmlNodeType.Attribute: // review this. 1311case XmlNodeType.Comment: 1314case XmlNodeType.ProcessingInstruction: 1985CompileBamlTag(XmlNodeType.Element, ref endTagHasBeenRead); 1998CompileBamlTag(XmlNodeType.EndElement, ref endTagHasBeenRead); 2037CompileBamlTag(XmlNodeType.EndElement, 2087case XmlNodeType.Text: 2088case XmlNodeType.CDATA: 2089case XmlNodeType.SignificantWhitespace: 2090case XmlNodeType.Whitespace: 2095case XmlNodeType.ProcessingInstruction: 2101case XmlNodeType.EntityReference: 2124XmlNodeType xmlNodeType, 2132case XmlNodeType.Element: 2144case XmlNodeType.EndElement: 2147case XmlNodeType.Text: 2148case XmlNodeType.CDATA: 2149case XmlNodeType.SignificantWhitespace: 2150case XmlNodeType.Whitespace: 3564XmlNodeType xmlNodeType, // Type of xml node we are processing. 3585case XmlNodeType.Element: 3742case XmlNodeType.EndElement: 3791case XmlNodeType.CDATA: 3792case XmlNodeType.Text: 3793case XmlNodeType.SignificantWhitespace: 3794case XmlNodeType.Whitespace: 3804case XmlNodeType.ProcessingInstruction: 3811case XmlNodeType.Comment: 3818case XmlNodeType.EntityReference: 4108CompileText(XmlNodeType.None, textValue); 5049private void CompileText(XmlNodeType xmlNodeType, string textValue) 5053Debug.Assert( xmlNodeType == XmlNodeType.Text || 5054xmlNodeType == XmlNodeType.Whitespace || 5055xmlNodeType == XmlNodeType.SignificantWhitespace || 5056xmlNodeType == XmlNodeType.CDATA || 5057xmlNodeType == XmlNodeType.None, 5061case XmlNodeType.Text: 5065case XmlNodeType.Whitespace: 5066case XmlNodeType.SignificantWhitespace: 5070case XmlNodeType.CDATA: 5071case XmlNodeType.None: 52190 == XmlReader.Depth && XmlReader.NodeType == XmlNodeType.None))
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (3)
172case XmlNodeType.Element: 183case XmlNodeType.EndElement: 750_inAttribute = (Reader.NodeType == XmlNodeType.Attribute);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlWrappingReader.cs (1)
43public override XmlNodeType NodeType { get { return _reader.NodeType; } }
PresentationCore (16)
MS\Internal\FontFace\CompositeFontParser.cs (16)
199if (_reader.NodeType == XmlNodeType.Attribute) 206if (_reader.NodeType == XmlNodeType.Attribute) 284private XmlNodeType MoveToContent() 292case XmlNodeType.CDATA: 293case XmlNodeType.Element: 294case XmlNodeType.EndElement: 295case XmlNodeType.EntityReference: 296case XmlNodeType.EndEntity: 402while (MoveToContent() != XmlNodeType.EndElement) 404if (_reader.NodeType == XmlNodeType.Element && _reader.NamespaceURI == CompositeFontNamespace) 417while (MoveToContent() == XmlNodeType.Element) 568while (MoveToContent() != XmlNodeType.EndElement) 570if (_reader.NodeType == XmlNodeType.Element && _reader.NamespaceURI == CompositeFontNamespace) 585while (MoveToContent() == XmlNodeType.Element) 816while (MoveToContent() != XmlNodeType.EndElement) 818if (_reader.NodeType == XmlNodeType.Element && _reader.NamespaceURI == CompositeFontNamespace)
PresentationFramework (27)
MS\Internal\Globalization\BamlTreeMap.cs (1)
643if (node.NodeType == XmlNodeType.Element)
MS\Internal\Globalization\BamlTreeUpdater.cs (2)
460if (node.NodeType == XmlNodeType.Text) 470else if (node.NodeType == XmlNodeType.Element)
MS\Internal\IO\Packaging\XamlFilter.cs (5)
397case XmlNodeType.Text: 398case XmlNodeType.SignificantWhitespace: 399case XmlNodeType.CDATA: 406case XmlNodeType.Element: 411case XmlNodeType.EndElement:
System\Windows\Annotations\Annotation.cs (6)
283while (!(XmlNodeType.EndElement == reader.NodeType && AnnotationXmlConstants.Elements.Annotation == reader.LocalName)) 292while (!(AnnotationXmlConstants.Elements.AnchorCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType)) 307while (!(AnnotationXmlConstants.Elements.CargoCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType)) 322while (!(AnnotationXmlConstants.Elements.AuthorCollection == reader.LocalName && XmlNodeType.EndElement == reader.NodeType)) 324if (!(AnnotationXmlConstants.Elements.StringAuthor == reader.LocalName && XmlNodeType.Element == reader.NodeType)) 516if (reader.NodeType == XmlNodeType.Attribute)
System\Windows\Annotations\AnnotationResource.cs (2)
173while (!(AnnotationXmlConstants.Elements.Resource == reader.LocalName && XmlNodeType.EndElement == reader.NodeType)) 185else if (XmlNodeType.Element == reader.NodeType)
System\Windows\Annotations\LocatorGroup.cs (1)
134while (!(AnnotationXmlConstants.Elements.ContentLocatorGroup == reader.LocalName && XmlNodeType.EndElement == reader.NodeType))
System\Windows\Annotations\LocatorPartList.cs (4)
204while (!(AnnotationXmlConstants.Elements.ContentLocator == reader.LocalName && XmlNodeType.EndElement == reader.NodeType)) 206if (XmlNodeType.Element != reader.NodeType) 222while (!(XmlNodeType.EndElement == reader.NodeType && part.PartType.Name == reader.LocalName)) 265if (!(XmlNodeType.EndElement == reader.NodeType && AnnotationXmlConstants.Elements.Item == reader.LocalName))
System\Windows\Documents\FixedFindEngine.cs (1)
391case XmlNodeType.Element:
System\Windows\Documents\FixedSchema.cs (2)
37if (base.NodeType == XmlNodeType.XmlDeclaration) 211if ( (Reader.NodeType == XmlNodeType.Element) && !_rootXMLNSChecked )
System\Windows\Markup\BamlRecordReader.cs (1)
2018XmlNodeType.Element,
System\Windows\Markup\FilteredXmlReader.cs (1)
232internal FilteredXmlReader( string xmlFragment, XmlNodeType fragmentType, XmlParserContext context ) :
System\Windows\Markup\XamlReader.cs (1)
294XmlTextReader reader = new XmlTextReader(stream, XmlNodeType.Document, parserContext)
PresentationFramework-SystemXml (2)
SystemXmlExtension.cs (2)
149if (node.NodeType == XmlNodeType.Element) 153if (node.ChildNodes[i].NodeType == XmlNodeType.Text)
ReachFramework (18)
Packaging\XpsFixedDocumentReaderWriter.cs (4)
954if (reader.NodeType == XmlNodeType.Element && reader.Name == XpsS0Markup.PageContent) 1073if (reader.NodeType == XmlNodeType.Element && 1093if( reader.NodeType == XmlNodeType.Element && 1102if( reader.NodeType == XmlNodeType.EndElement &&
Packaging\XpsFixedDocumentSequenceReaderWriter.cs (1)
553if (reader.NodeType == XmlNodeType.Element && reader.Name == XpsS0Markup.DocumentReference)
Packaging\XPSSignatureDefinition.cs (5)
414if( reader.NodeType != XmlNodeType.Element || 432case XmlNodeType.Element: 436case XmlNodeType.EndElement: 577case XmlNodeType.Text: 582case XmlNodeType.EndElement:
PrintConfig\PrtCap_Reader.cs (3)
47if ((_xmlReader.MoveToContent() != XmlNodeType.Element) || 126if ((_xmlReader.NodeType == XmlNodeType.EndElement) && 134if ((_xmlReader.NodeType != XmlNodeType.Element) ||
PrintConfig\PrtTicket_Base.cs (2)
821(valueNode.FirstChild.NodeType != XmlNodeType.Text)) 1292(valueNode.FirstChild.NodeType != XmlNodeType.Text))
PrintConfig\PrtTicket_Editor.cs (3)
101if ((rootChild.NodeType != XmlNodeType.Element) || 249if ((child.NodeType != XmlNodeType.Element) || 313if ((child.NodeType != XmlNodeType.Element) ||
System.Configuration.ConfigurationManager (106)
System\Configuration\AppSettingsSection.cs (2)
122XmlNodeType t = xmlUtil.Reader.NodeType; 123if (t != XmlNodeType.Comment)
System\Configuration\BaseConfigurationRecord.cs (16)
1528XmlNodeType t = xmlUtil.Reader.NodeType; 1529if (t != XmlNodeType.Comment) 1757if ((xmlUtil.Reader.NodeType != XmlNodeType.Element) || (xmlUtil.Reader.Name != ConfigurationTag)) 2572XmlNodeType t = xmlUtil.Reader.NodeType; 2573if (t == XmlNodeType.EndElement) 2576if (t == XmlNodeType.Comment) continue; 2583if (t == XmlNodeType.Element) 2625if (xmlUtil.Reader.NodeType != XmlNodeType.Element) 3569XmlNodeType nodeType; 3588if ((nodeType == XmlNodeType.Element) && (clone.Name == "EncryptedData")) 3594if (nodeType == XmlNodeType.EndElement) 3597if ((nodeType != XmlNodeType.Comment) && (nodeType != XmlNodeType.Whitespace)) 3625if (nodeType == XmlNodeType.EndElement) break; 3627if ((nodeType != XmlNodeType.Comment) && (nodeType != XmlNodeType.Whitespace))
System\Configuration\ConfigurationElement.cs (4)
1503if (reader.NodeType == XmlNodeType.Element) 1553if (reader.NodeType == XmlNodeType.EndElement) break; 1555if ((reader.NodeType == XmlNodeType.CDATA) || (reader.NodeType == XmlNodeType.Text))
System\Configuration\ConfigurationSection.cs (1)
39if (!reader.Read() || (reader.NodeType != XmlNodeType.Element))
System\Configuration\DefaultSection.cs (1)
51if (!xmlReader.Read() || (xmlReader.NodeType != XmlNodeType.Element))
System\Configuration\DpapiProtectedConfigurationProvider.cs (2)
20if (encryptedNode.NodeType != XmlNodeType.Element || 107if (child.NodeType != XmlNodeType.Element)
System\Configuration\HandlerBase.cs (3)
151if (node.NodeType != XmlNodeType.Element) 159if (node.NodeType == XmlNodeType.Comment || node.NodeType == XmlNodeType.Whitespace)
System\Configuration\IgnoreSection.cs (1)
51if (!xmlReader.Read() || (xmlReader.NodeType != XmlNodeType.Element))
System\Configuration\LocalFileSettingsProvider.cs (1)
472if (child.NodeType == XmlNodeType.XmlDeclaration)
System\Configuration\MgmtConfigurationRecord.cs (20)
602reader = new XmlTextReader(xmlElement, XmlNodeType.Element, context); 606if (reader.NodeType != XmlNodeType.Element) 632case XmlNodeType.XmlDeclaration: 633case XmlNodeType.DocumentType: 639if ((reader.Depth <= 0) && (reader.NodeType != XmlNodeType.EndElement)) 2183if ((xmlUtil.Reader.NodeType == XmlNodeType.Element) && utilWriter.IsLastLineBlank) 2209Debug.Assert((reader.NodeType == XmlNodeType.Element) && (reader.Name == ConfigurationTag), 2245if ((reader.NodeType == XmlNodeType.Element) && (reader.Name == ConfigSectionsTag)) 2271(reader.NodeType == XmlNodeType.EndElement) && 2312bool skipFirstIndent = (reader.Depth > 0) && (reader.NodeType == XmlNodeType.Element); 2347((reader.NodeType == XmlNodeType.EndElement) && (reader.Name == ConfigurationTag)), 2386case XmlNodeType.Element: 2390case XmlNodeType.EndElement: 2424if (reader.NodeType == XmlNodeType.Element) 2613if (reader.NodeType == XmlNodeType.Element) 2620if (reader.NodeType == XmlNodeType.EndElement) 2662if (reader.NodeType == XmlNodeType.Element) 2937if (reader.NodeType == XmlNodeType.EndElement) 3102if (reader.NodeType == XmlNodeType.Element) 3128if (reader.IsEmptyElement || (reader.NodeType == XmlNodeType.EndElement)) reader.Read();
System\Configuration\RuntimeConfigurationRecord.cs (1)
135if (xmlNode.NodeType == XmlNodeType.Element) CheckForLockAttributes(sectionName, child);
System\Configuration\XmlUtil.cs (53)
84case XmlNodeType.XmlDeclaration: 85case XmlNodeType.Comment: 86case XmlNodeType.DocumentType: 88case XmlNodeType.Element: 127private static int GetPositionOffset(XmlNodeType nodeType) 157if (Reader.MoveToContent() == XmlNodeType.Element) 174while (!Reader.EOF && (Reader.NodeType != XmlNodeType.Element)) 189if (Reader.NodeType == XmlNodeType.Element) return; 203while (!Reader.EOF && (Reader.NodeType != XmlNodeType.Element)) 221while (!Reader.EOF && (Reader.NodeType != XmlNodeType.EndElement)) 233XmlNodeType nodeType = Reader.NodeType; 235if ((nodeType != XmlNodeType.Comment) && (nodeType != XmlNodeType.EndElement)) 364Debug.Assert(Reader.NodeType == XmlNodeType.Element, "Reader.NodeType == XmlNodeType.Element"); 371while (Reader.NodeType != XmlNodeType.EndElement) 372if (Reader.NodeType == XmlNodeType.Element) 381if (Reader.NodeType == XmlNodeType.Whitespace) Reader.Skip(); 417if (Reader.NodeType == XmlNodeType.EndElement) 427if (Reader.NodeType == XmlNodeType.Element) 452Debug.Assert(Reader.NodeType == XmlNodeType.Element, "_reader.NodeType == XmlNodeType.Element"); 473if (Reader.NodeType != XmlNodeType.Whitespace) 493if (Reader.NodeType == XmlNodeType.Element) 507Debug.Assert(Reader.NodeType == XmlNodeType.Element, "_reader.NodeType== XmlNodeType.Element"); 561XmlNodeType nodeType = Reader.NodeType; 562if (nodeType == XmlNodeType.Whitespace) utilWriter.Write(Reader.Value); 565if (nodeType == XmlNodeType.Element) 613if (nodeType == XmlNodeType.EndElement) 629if (nodeType == XmlNodeType.Comment) utilWriter.AppendComment(Reader.Value); 632if (nodeType == XmlNodeType.Text) utilWriter.AppendEscapeTextString(Reader.Value); 635if (nodeType == XmlNodeType.XmlDeclaration) 686if (nodeType == XmlNodeType.SignificantWhitespace) utilWriter.Write(Reader.Value); 689if (nodeType == XmlNodeType.ProcessingInstruction) 705if (nodeType == XmlNodeType.EntityReference) 709if (nodeType == XmlNodeType.CDATA) 713if (nodeType == XmlNodeType.DocumentType) 831Debug.Assert(Reader.NodeType == XmlNodeType.Element, 866Debug.Assert(Reader.NodeType == XmlNodeType.Element, "_reader.NodeType == NodeType.Element"); 952(Reader.NodeType == XmlNodeType.Whitespace)) 975XmlTextReader reader = new XmlTextReader(xmlElement, XmlNodeType.Element, context); 991XmlNodeType nodeType = reader.NodeType; 1003case XmlNodeType.CDATA: 1004case XmlNodeType.Element: 1005case XmlNodeType.EndElement: 1006case XmlNodeType.Comment: 1025case XmlNodeType.Whitespace: 1027case XmlNodeType.SignificantWhitespace: 1030case XmlNodeType.CDATA: 1033case XmlNodeType.ProcessingInstruction: 1036case XmlNodeType.Comment: 1039case XmlNodeType.Text: 1043case XmlNodeType.Element: 1088case XmlNodeType.EndElement: 1093case XmlNodeType.EntityReference:
System\Configuration\XmlUtilWriter.cs (1)
226if (reader.NodeType == XmlNodeType.Text)
System.Data.Common (209)
System\Data\Common\ObjectStorage.cs (1)
430if (type == typeof(string) && xmlReader.NodeType == XmlNodeType.Element && xmlReader.IsEmptyElement)
System\Data\DataSet.cs (26)
202if (reader.NodeType == XmlNodeType.Element) 1590if (reader.NodeType == XmlNodeType.Element) 1689if (reader.NodeType == XmlNodeType.Element) 1696if (reader.NodeType == XmlNodeType.Element) 1784while (!reader.EOF && reader.NodeType != XmlNodeType.EndElement && reader.NodeType != XmlNodeType.Element && reader.Depth > depth) 1788return (reader.NodeType == XmlNodeType.Element); 1793while (!reader.EOF && reader.NodeType != XmlNodeType.EndElement && reader.NodeType != XmlNodeType.Element) 1800while (reader.NodeType == XmlNodeType.Whitespace) 1804if (reader.NodeType == XmlNodeType.None) 1808else if (reader.NodeType == XmlNodeType.EndElement) 1845while (reader.NodeType == XmlNodeType.Whitespace) 2113if (reader.NodeType == XmlNodeType.Element) 2118if (reader.NodeType == XmlNodeType.Element) 2218while (!reader.EOF && reader.NodeType == XmlNodeType.Whitespace) 2220if (reader.NodeType != XmlNodeType.Element) 2483if (reader.NodeType == XmlNodeType.Whitespace) 2498if (reader.NodeType == XmlNodeType.Whitespace) 2509if (reader.NodeType == XmlNodeType.Whitespace) 2514Debug.Assert(reader.NodeType != XmlNodeType.Whitespace, "Should not be on Whitespace node"); 2625if ((mode != XmlReadMode.Fragment) && (reader.NodeType == XmlNodeType.Element)) 2633if (reader.NodeType == XmlNodeType.Element) 2845XmlTextReader reader = (mode == XmlReadMode.Fragment) ? new XmlTextReader(stream, XmlNodeType.Element, null) : new XmlTextReader(stream); 2860XmlTextReader xmlreader = (mode == XmlReadMode.Fragment) ? new XmlTextReader(reader.ReadToEnd(), XmlNodeType.Element, null) : new XmlTextReader(reader); 2874xr = new XmlTextReader(stream, XmlNodeType.Element, null);
System\Data\DataTable.cs (10)
5789if (reader.NodeType == XmlNodeType.Element) 6016if ((mode != XmlReadMode.Fragment) && (reader.NodeType == XmlNodeType.Element)) 6033if (reader.NodeType == XmlNodeType.Element) 6272while (reader.NodeType == XmlNodeType.Whitespace) 6276if (reader.NodeType == XmlNodeType.None) 6280else if (reader.NodeType == XmlNodeType.EndElement) 6294while (!reader.EOF && reader.NodeType != XmlNodeType.EndElement && reader.NodeType != XmlNodeType.Element && reader.Depth > depth) 6298return (reader.NodeType == XmlNodeType.Element); 6334if (reader.NodeType == XmlNodeType.Whitespace)
System\Data\DataViewManager.cs (1)
119if (r.NodeType != XmlNodeType.Element)
System\Data\XmlDataLoader.cs (29)
103if (n.NodeType == XmlNodeType.Element) 142while (n != null && (n.NodeType == XmlNodeType.Whitespace || !IsTextLikeNode(n.NodeType))) 176while (n.NodeType == XmlNodeType.Whitespace) 261internal static bool IsTextLikeNode(XmlNodeType n) 265case XmlNodeType.EntityReference: 268case XmlNodeType.Text: 269case XmlNodeType.Whitespace: 270case XmlNodeType.SignificantWhitespace: 271case XmlNodeType.CDATA: 398if (n.NodeType == XmlNodeType.Element) 631if (reader.NodeType != XmlNodeType.Element) 746case XmlNodeType.Element: // It's an element 796case XmlNodeType.EntityReference: // Oops. No support for Entity Reference 798case XmlNodeType.Text: // It looks like a text. 799case XmlNodeType.Whitespace: // This actually could be 800case XmlNodeType.CDATA: // if we have XmlText in our table 801case XmlNodeType.SignificantWhitespace: 975case XmlNodeType.Element: // It's an element 1031case XmlNodeType.EntityReference: // Oops. No support for Entity Reference 1033case XmlNodeType.Text: // It looks like a text. 1034case XmlNodeType.Whitespace: // This actually could be 1035case XmlNodeType.CDATA: // if we have XmlText in our table 1036case XmlNodeType.SignificantWhitespace: 1245case XmlNodeType.Text: // It looks like a text. And we need it. 1246case XmlNodeType.Whitespace: 1247case XmlNodeType.CDATA: 1248case XmlNodeType.SignificantWhitespace: 1274case XmlNodeType.Element: 1335case XmlNodeType.EntityReference: // Oops. No support for Entity Reference
System\Data\XMLDiffLoader.cs (11)
203if (XmlNodeType.Element == ssync.NodeType) 214while ((ssync.NodeType == XmlNodeType.EndElement) && (iSsyncDepth < ssync.Depth)) 258if (XmlNodeType.Element == ssync.NodeType) 268while ((ssync.NodeType == XmlNodeType.EndElement) && (iSsyncDepth < ssync.Depth)) 357if (currentDepth == iRowDepth && row.NodeType == XmlNodeType.EndElement) 382while ((row.NodeType != XmlNodeType.EndElement) && (row.LocalName != ln) && (row.NamespaceURI != ns)) 435if (row.NodeType == XmlNodeType.Text || row.NodeType == XmlNodeType.Whitespace || row.NodeType == XmlNodeType.SignificantWhitespace) 459while (reader.NodeType == XmlNodeType.Whitespace || reader.NodeType == XmlNodeType.SignificantWhitespace)
System\Data\xmlsaver.cs (1)
3341public override XmlNodeType NodeType
System\Data\XmlToDatasetMap.cs (3)
441XmlNode? nodeRegion = (node.NodeType == XmlNodeType.Attribute) ? ((XmlAttribute)node).OwnerElement : node.ParentNode; 445if (nodeRegion == null || nodeRegion.NodeType != XmlNodeType.Element) 479if (node.NodeType == XmlNodeType.Element)
System\Xml\DataPointer.cs (45)
297else if (_node.NodeType == XmlNodeType.Attribute) 320if (_column == null && _node.NodeType == XmlNodeType.Element) 347if ((_column == null || _column.ColumnMapping == MappingType.Attribute) && _node.NodeType == XmlNodeType.Element) 372internal XmlNodeType NodeType 380return XmlNodeType.None; 388return XmlNodeType.Text; 392return XmlNodeType.Attribute; 396return XmlNodeType.Element; 502private static bool IsLocalNameEmpty(XmlNodeType nt) 506case XmlNodeType.None: 507case XmlNodeType.Text: 508case XmlNodeType.CDATA: 509case XmlNodeType.Comment: 510case XmlNodeType.Document: 511case XmlNodeType.DocumentFragment: 512case XmlNodeType.Whitespace: 513case XmlNodeType.SignificantWhitespace: 514case XmlNodeType.EndElement: 515case XmlNodeType.EndEntity: 517case XmlNodeType.Element: 518case XmlNodeType.Attribute: 519case XmlNodeType.EntityReference: 520case XmlNodeType.Entity: 521case XmlNodeType.ProcessingInstruction: 522case XmlNodeType.DocumentType: 523case XmlNodeType.Notation: 524case XmlNodeType.XmlDeclaration: 609if (_node.NodeType == XmlNodeType.Element) 624if (_node != null && _column == null && _node.NodeType == XmlNodeType.Attribute) 700XmlNodeType nt = NodeType; 703case XmlNodeType.DocumentType: 708case XmlNodeType.Entity: 713case XmlNodeType.Notation: 727XmlNodeType nt = NodeType; 730case XmlNodeType.DocumentType: 735case XmlNodeType.Entity: 740case XmlNodeType.Notation: 754if (NodeType == XmlNodeType.DocumentType) 768if (child != null && child.NodeType == XmlNodeType.XmlDeclaration) 778if (NodeType == XmlNodeType.XmlDeclaration) 783else if (NodeType == XmlNodeType.Document) 799if (NodeType == XmlNodeType.XmlDeclaration) 804else if (NodeType == XmlNodeType.Document) 820if (NodeType == XmlNodeType.XmlDeclaration) 825else if (NodeType == XmlNodeType.Document)
System\Xml\DataSetMappper.cs (8)
138if (n.NodeType == XmlNodeType.Element) 169if (node.NodeType == XmlNodeType.Attribute && mt == MappingType.Attribute) 174if (node.NodeType == XmlNodeType.Element && mt == MappingType.Element) 224if (node.NodeType == XmlNodeType.Attribute) 279if (fc == null || fc.NodeType != XmlNodeType.Text || fc.NextSibling != null) 291if (n.NodeType != XmlNodeType.Element) 324if (fc == null || fc.NodeType != XmlNodeType.Text || fc.NextSibling != null) 334if (n.NodeType != XmlNodeType.Element)
System\Xml\RegionIterator.cs (4)
123Debug.Assert(CurrentNode.NodeType == XmlNodeType.Element); 126if (CurrentNode.NodeType == XmlNodeType.Element && DataSetMapper.GetTableSchemaForElement((XmlElement)(CurrentNode)) != null) 169while (n.NodeType == XmlNodeType.Whitespace) 190if (n.NodeType != XmlNodeType.Whitespace)
System\Xml\XmlBoundElement.cs (5)
267Debug.Assert(dp.NodeType == XmlNodeType.Element); 307Debug.Assert(dp.NodeType == XmlNodeType.Element); 351case XmlNodeType.Attribute: 371case XmlNodeType.Element: 375case XmlNodeType.Text:
System\Xml\XmlDataDocument.cs (30)
764if (node.NodeType != XmlNodeType.Element) 997if (newNode.NodeType == XmlNodeType.Element) 1039if (dp.NodeType == XmlNodeType.Element) 1059XmlNodeType.DocumentFragment => CreateDocumentFragment(), 1060XmlNodeType.DocumentType => CreateDocumentType(dp.Name, dp.PublicId, dp.SystemId, dp.InternalSubset), 1061XmlNodeType.XmlDeclaration => CreateXmlDeclaration(dp.Version!, dp.Encoding, dp.Standalone), 1064XmlNodeType.Text => CreateTextNode(dp.Value), 1065XmlNodeType.CDATA => CreateCDataSection(dp.Value), 1066XmlNodeType.ProcessingInstruction => CreateProcessingInstruction(dp.Name, dp.Value!), 1067XmlNodeType.Comment => CreateComment(dp.Value), 1068XmlNodeType.Whitespace => CreateWhitespace(dp.Value), 1069XmlNodeType.SignificantWhitespace => CreateSignificantWhitespace(dp.Value), 1072XmlNodeType.Element => CreateElement(dp.Prefix, dp.LocalName, dp.NamespaceURI), 1073XmlNodeType.Attribute => CreateAttribute(dp.Prefix, dp.LocalName, dp.NamespaceURI), 1074XmlNodeType.EntityReference => CreateEntityReference(dp.Name), 1088case XmlNodeType.Text: 1089case XmlNodeType.CDATA: 1090case XmlNodeType.Whitespace: 1091case XmlNodeType.SignificantWhitespace: 1094case XmlNodeType.EntityReference: 1103internal static bool IsTextNode(XmlNodeType nt) 1107case XmlNodeType.Text: 1108case XmlNodeType.CDATA: 1109case XmlNodeType.Whitespace: 1110case XmlNodeType.SignificantWhitespace: 1515if (iter.CurrentNode!.NodeType == XmlNodeType.Element) 2275Debug.Assert(parent.NodeType != XmlNodeType.Attribute); // We need to get the grand-parent region 2330while (n != null && n.NodeType == XmlNodeType.Whitespace) 2335if (n.NodeType == XmlNodeType.Text) 2953if (parent != null && parent.NodeType == XmlNodeType.Attribute)
System\Xml\XPathNodePointer.cs (35)
58case XmlNodeType.Whitespace: 60case XmlNodeType.SignificantWhitespace: 63case XmlNodeType.Text: 64case XmlNodeType.CDATA: 91private static bool IsNamespaceNode(XmlNodeType nt, string ns) => nt == XmlNodeType.Attribute && ns == StrReservedXmlns; 134if (_node.NodeType == XmlNodeType.Element) 190XmlNodeType nt = _node.NodeType; 193if (nt == XmlNodeType.Element || nt == XmlNodeType.Attribute || nt == XmlNodeType.ProcessingInstruction) 219XmlNodeType nt = _node.NodeType; 227if (nt == XmlNodeType.Element || nt == XmlNodeType.Attribute || nt == XmlNodeType.ProcessingInstruction) 354if (_node.NodeType == XmlNodeType.Document) 423if (curNode.NodeType == XmlNodeType.Attribute) 521if (_column == null && _node.NodeType == XmlNodeType.Element) 592if ((_column == null || _column.ColumnMapping == MappingType.Attribute) && _node.NodeType == XmlNodeType.Element) 627if (bFirst && (_column != null || _node.NodeType != XmlNodeType.Element)) 633if (_column == null && _node.NodeType != XmlNodeType.Attribute) 998if (_node.NodeType == XmlNodeType.Attribute) 1074XmlNode? parent = ((curNode.NodeType == XmlNodeType.Attribute) ? (((XmlAttribute)curNode).OwnerElement) : (curNode.ParentNode)); 1183curNode1 = ((curNode1.NodeType == XmlNodeType.Attribute) ? (((XmlAttribute)curNode1).OwnerElement) : (curNode1.ParentNode)); 1193curNode2 = ((curNode2.NodeType == XmlNodeType.Attribute) ? (((XmlAttribute)curNode2).OwnerElement) : (curNode2.ParentNode)); 1370XmlNodeType nt; 1375while (node != null && ((nt = node.NodeType) != XmlNodeType.Element)) 1377if (nt == XmlNodeType.Attribute) 1444} while (node != null && node.NodeType != XmlNodeType.Element); 1530} while (node != null && node.NodeType != XmlNodeType.Element); 1560} while (node != null && node.NodeType != XmlNodeType.Element); 1601} while (node != null && node.NodeType != XmlNodeType.Element); 1603else if (_node.NodeType == XmlNodeType.Attribute) 1620} while (node != null && node.NodeType != XmlNodeType.Element); 1633} while (node != null && node.NodeType == XmlNodeType.Element);
System.IO.Packaging (23)
System\IO\Packaging\InternalRelationshipCollection.cs (5)
245if (reader.NodeType == XmlNodeType.Element 266if (reader.NodeType == XmlNodeType.None) 269if (reader.NodeType == XmlNodeType.Element 298if (!((reader.LocalName == RelationshipsTagName) && (reader.NodeType == XmlNodeType.EndElement))) 373if (reader.NodeType == XmlNodeType.EndElement && reader.LocalName == RelationshipTagName)
System\IO\Packaging\PackagingUtilities.cs (2)
34if (reader.Read() && reader.NodeType == XmlNodeType.XmlDeclaration && reader.Depth == 0) 86Debug.Assert(reader.NodeType == XmlNodeType.Element, "XmlReader should be positioned at an Element");
System\IO\Packaging\PartBasedPackageProperties.cs (6)
494if (reader.MoveToContent() != XmlNodeType.Element 515while (reader.Read() && reader.MoveToContent() != XmlNodeType.None) 518if (reader.NodeType == XmlNodeType.EndElement) 522if (reader.NodeType != XmlNodeType.Element) 642if (reader.MoveToContent() == XmlNodeType.EndElement) 646if (reader.NodeType != XmlNodeType.Text)
System\IO\Packaging\XmlCompatibilityReader.cs (3)
155case XmlNodeType.Element: 164case XmlNodeType.EndElement: 689_inAttribute = (Reader.NodeType == XmlNodeType.Attribute);
System\IO\Packaging\XmlWrappingReader.cs (1)
26public override XmlNodeType NodeType { get { return _reader.NodeType; } }
System\IO\Packaging\ZipPackage.cs (6)
980if ((reader.NodeType == XmlNodeType.Element) 1001if (reader.NodeType == XmlNodeType.None) 1006if (reader.NodeType == XmlNodeType.Element 1013else if (reader.NodeType == XmlNodeType.Element 1020else if (reader.NodeType == XmlNodeType.EndElement && reader.Depth == 0 && reader.Name == TypesTagName) 1226if (reader.NodeType == XmlNodeType.EndElement && elementName == reader.LocalName)
System.Private.DataContractSerialization (203)
System\Runtime\Serialization\DataContractSerializer.cs (1)
487throw XmlObjectSerializer.CreateSerializationExceptionWithReaderDetails(SR.Format(SR.ExpectingElementAtDeserialize, XmlNodeType.Element), xmlReader);
System\Runtime\Serialization\ExtensionDataReader.cs (9)
35private XmlNodeType _nodeType; 113public override XmlNodeType NodeType { get { return IsXmlDataNode ? _xmlNodeReader.NodeType : _nodeType; } } 162_nodeType = XmlNodeType.Attribute; 210if (_nodeType != XmlNodeType.Attribute) 219_nodeType = XmlNodeType.Element; 289if (_nodeType == XmlNodeType.Attribute && MoveToNextAttribute()) 304_nodeType = XmlNodeType.Text; 313_nodeType = XmlNodeType.EndElement; 326_nodeType = XmlNodeType.None;
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (1)
458throw XmlObjectSerializer.CreateSerializationExceptionWithReaderDetails(SR.Format(SR.ExpectingElementAtDeserialize, XmlNodeType.Element), xmlReader);
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (7)
768LocalBuilder nodeType = _ilg.DeclareLocal(typeof(XmlNodeType)); 774_ilg.Load(XmlNodeType.EndElement); 778_ilg.Load(XmlNodeType.Element); 780ThrowUnexpectedStateException(XmlNodeType.Element); 1034ThrowUnexpectedStateException(XmlNodeType.Element); 1052_ilg.Load(XmlNodeType.EndElement); 1056private void ThrowUnexpectedStateException(XmlNodeType expectedState)
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (4)
189XmlNodeType nodeType = xmlReader.MoveToContent(); 190if (nodeType == XmlNodeType.EndElement) 194if (nodeType != XmlNodeType.Element) 196throw XmlObjectSerializerReadContext.CreateUnexpectedStateException(XmlNodeType.Element, xmlReader);
System\Runtime\Serialization\Json\XmlJsonReader.cs (4)
319return (this.Node.NodeType == XmlNodeType.Attribute || this.Node is XmlAttributeTextNode); 336(this.Node.NodeType == XmlNodeType.Text)); 569else if (this.Node.NodeType == XmlNodeType.Element) 582else if (this.Node.NodeType == XmlNodeType.EndElement)
System\Runtime\Serialization\ReflectionReader.cs (2)
168if (xmlReader.NodeType == XmlNodeType.EndElement) 175throw XmlObjectSerializerReadContext.CreateUnexpectedStateException(XmlNodeType.Element, xmlReader);
System\Runtime\Serialization\SchemaImporter.cs (1)
1417if (child.NodeType == XmlNodeType.Element)
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (1)
663s_createUnexpectedStateExceptionMethod = typeof(XmlObjectSerializerReadContext).GetMethod("CreateUnexpectedStateException", Globals.ScanAllMembers, new Type[] { typeof(XmlNodeType), typeof(XmlReaderDelegator) });
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (3)
954ThrowUnexpectedStateException(XmlNodeType.Element); 972_ilg.Load(XmlNodeType.EndElement); 976private void ThrowUnexpectedStateException(XmlNodeType expectedState)
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (41)
216return (xmlReader.MoveToContent() != XmlNodeType.EndElement); 269if (xmlReader.NodeType != XmlNodeType.Element) 270throw CreateUnexpectedStateException(XmlNodeType.Element, xmlReader); 482if (xmlReader.NodeType == XmlNodeType.EndElement) 490if (xmlReader.NodeType != XmlNodeType.EndElement) 491throw CreateUnexpectedStateException(XmlNodeType.EndElement, xmlReader); 523throw CreateUnexpectedStateException(XmlNodeType.Element, xmlReader); 548XmlNodeType nodeType; 549while ((nodeType = xmlReader.MoveToContent()) != XmlNodeType.EndElement) 551if (nodeType != XmlNodeType.Element) 553throw CreateUnexpectedStateException(XmlNodeType.Element, xmlReader); 726case XmlNodeType.Text: 728case XmlNodeType.Element: 734case XmlNodeType.EndElement: 743throw CreateUnexpectedStateException(XmlNodeType.Element, xmlReader); 792XmlNodeType nodeType; 793while ((nodeType = xmlReader.MoveToContent()) != XmlNodeType.EndElement) 795if (nodeType != XmlNodeType.Element) 796throw CreateUnexpectedStateException(XmlNodeType.Element, xmlReader); 815XmlNodeType nodeType; 816while ((nodeType = xmlReader.MoveToContent()) != XmlNodeType.EndElement) 818if (nodeType != XmlNodeType.Element) 819throw CreateUnexpectedStateException(XmlNodeType.Element, xmlReader); 874XmlNodeType nodeType; 875while ((nodeType = xmlReader.MoveToContent()) != XmlNodeType.EndElement) 877if (nodeType != XmlNodeType.Element) 878throw CreateUnexpectedStateException(XmlNodeType.Element, xmlReader); 903if (xmlReader.NodeType == XmlNodeType.EndElement) 909XmlNodeType nodeType = xmlReader.MoveToContent(); 910if (nodeType != XmlNodeType.Text) 924while (xmlReader.MoveToContent() != XmlNodeType.EndElement) 963XmlNodeType nodeType; 964while ((nodeType = xmlReader.NodeType) != XmlNodeType.EndElement) 966if (nodeType == XmlNodeType.Element) 1025private static bool IsContentNode(XmlNodeType nodeType) 1029case XmlNodeType.Whitespace: 1030case XmlNodeType.SignificantWhitespace: 1031case XmlNodeType.Comment: 1032case XmlNodeType.ProcessingInstruction: 1033case XmlNodeType.DocumentType: 1080internal static Exception CreateUnexpectedStateException(XmlNodeType expectedState, XmlReaderDelegator xmlReader)
System\Runtime\Serialization\XmlReaderDelegator.cs (4)
167internal XmlNodeType NodeType 169get { return isEndOfEmptyElement ? XmlNodeType.EndElement : reader.NodeType; } 188internal XmlNodeType MoveToContent() 191return XmlNodeType.EndElement;
System\Runtime\Serialization\XmlSerializableReader.cs (7)
27if (xmlReader.NodeType != XmlNodeType.Element) 28throw XmlObjectSerializerReadContext.CreateUnexpectedStateException(XmlNodeType.Element, xmlReader); 46throw XmlObjectSerializerReadContext.CreateUnexpectedStateException(XmlNodeType.EndElement, _xmlReader); 56if (reader.NodeType == XmlNodeType.EndElement || 57(reader.NodeType == XmlNodeType.Element && reader.IsEmptyElement)) 71public override XmlNodeType NodeType { get { return InnerReader.NodeType; } } 114public override XmlNodeType MoveToContent() { return InnerReader.MoveToContent(); }
System\Runtime\Serialization\XmlSerializableServices.cs (1)
36while (xmlReader.Depth > startDepth && xmlReader.NodeType != XmlNodeType.EndElement)
System\Xml\ArrayHelper.cs (1)
44if (read < array.Length || reader.NodeType == XmlNodeType.EndElement)
System\Xml\XmlBaseReader.cs (57)
221_whitespaceTextNode.NodeType = XmlNodeType.SignificantWhitespace; 223_whitespaceTextNode.NodeType = XmlNodeType.Whitespace; 820public override XmlNodeType MoveToContent() 826if (_node.NodeType != XmlNodeType.Text && _node.NodeType != XmlNodeType.CDATA) 847if (_node.NodeType == XmlNodeType.Attribute) 921public sealed override XmlNodeType NodeType 993XmlNodeType nodeType = _node.NodeType; 994if (nodeType == XmlNodeType.Element) 996if (nodeType == XmlNodeType.EndElement) 998if (nodeType == XmlNodeType.None) 1001if (_node.NodeType == XmlNodeType.Element) 1004return (MoveToContent() == XmlNodeType.Element); 1024return (_node.NodeType == XmlNodeType.Element || IsStartElement()) && _node.Prefix == prefix && _node.LocalName == localName; 1033return (_node.NodeType == XmlNodeType.Element || IsStartElement()) && _node.LocalName == localName && _node.IsNamespaceUri(namespaceUri); 1041return (_node.NodeType == XmlNodeType.Element || IsStartElement()) && _node.LocalName == localName && _node.IsNamespaceUri(namespaceUri); 1183if (_node.NodeType != XmlNodeType.Element) 1231if (_node.NodeType != XmlNodeType.Element) 1250if (_node.NodeType != XmlNodeType.EndElement && MoveToContent() != XmlNodeType.EndElement) 1252int nodeDepth = _node.NodeType == XmlNodeType.Element ? _depth - 1 : _depth; 1359while (_node.NodeType != XmlNodeType.Comment && _node.Value.TryReadBase64(buffer, offset, count, out actual)) 1367XmlNodeType nodeType = _node.NodeType; 1368if (nodeType == XmlNodeType.Element || nodeType == XmlNodeType.EndElement) 1431XmlNodeType nodeType = _node.NodeType; 1432if (nodeType == XmlNodeType.Element || nodeType == XmlNodeType.EndElement) 1726if ((_node.NodeType == XmlNodeType.Element || MoveToElement()) && !IsEmptyElement) 1734if (_node.NodeType == XmlNodeType.EndElement) 1952case XmlNodeType.None: 1954case XmlNodeType.Element: 1960case XmlNodeType.Text: 1961case XmlNodeType.Whitespace: 1962case XmlNodeType.SignificantWhitespace: 1963case XmlNodeType.CDATA: 1966case XmlNodeType.XmlDeclaration: 1969case XmlNodeType.Comment: 1972case XmlNodeType.EndElement: 2036private XmlNodeType _nodeType; 2066protected XmlNode(XmlNodeType nodeType, 2088_exitScope = (nodeType == XmlNodeType.EndElement); 2114public XmlNodeType NodeType 2360: base(XmlNodeType.Element, 2404: base(XmlNodeType.Attribute, 2419: base(XmlNodeType.EndElement, 2433protected XmlTextNode(XmlNodeType nodeType, 2450: base(XmlNodeType.Text, 2465: base(XmlNodeType.Text, 2480: base(XmlNodeType.Whitespace, 2495: base(XmlNodeType.CDATA, 2510: base(XmlNodeType.Text, 2525: base(XmlNodeType.None, 2540: base(XmlNodeType.XmlDeclaration, 2555: base(XmlNodeType.Comment, 2570: base(XmlNodeType.None, 2585: base(XmlNodeType.None,
System\Xml\XmlBinaryReader.cs (12)
91if (this.Node.NodeType != XmlNodeType.Element) 119if (this.Node.NodeType != XmlNodeType.Element) 150if (this.Node.NodeType != XmlNodeType.Element) 196if (this.Node.NodeType != XmlNodeType.Element) 210if (this.Node.NodeType != XmlNodeType.Element) 224if (this.Node.NodeType != XmlNodeType.Element) 238if (this.Node.NodeType != XmlNodeType.Element) 252if (this.Node.NodeType != XmlNodeType.Element) 266if (this.Node.NodeType != XmlNodeType.Element) 280if (this.Node.NodeType != XmlNodeType.Element) 1123if (this.Node.NodeType != XmlNodeType.Element) 1128if (this.Node.NodeType != XmlNodeType.EndElement)
System\Xml\XmlDictionaryReader.cs (25)
395case XmlNodeType.Attribute: 398case XmlNodeType.Text: 399case XmlNodeType.Whitespace: 400case XmlNodeType.SignificantWhitespace: 401case XmlNodeType.CDATA: 416case XmlNodeType.ProcessingInstruction: 417case XmlNodeType.Comment: 418case XmlNodeType.EndEntity: 421case XmlNodeType.EntityReference: 428case XmlNodeType.Element: 429case XmlNodeType.EndElement: 457if (this.NodeType != XmlNodeType.Element) 459if (this.NodeType == XmlNodeType.Element) 465if (this.NodeType == XmlNodeType.EndElement) 546protected bool IsTextNode(XmlNodeType nodeType) 548return nodeType == XmlNodeType.Text || 549nodeType == XmlNodeType.Whitespace || 550nodeType == XmlNodeType.SignificantWhitespace || 551nodeType == XmlNodeType.CDATA || 552nodeType == XmlNodeType.Attribute; 560XmlNodeType nodeType = this.NodeType; 562if (nodeType == XmlNodeType.Element || nodeType == XmlNodeType.EndElement) 572if (nodeType == XmlNodeType.Attribute /* || inAttributeText */) 1487public override XmlNodeType NodeType
System\Xml\XmlDictionaryWriter.cs (15)
269if (reader.NodeType == XmlNodeType.EntityReference) 387int d = (reader.NodeType == XmlNodeType.None ? -1 : reader.Depth); 390XmlNodeType nodeType = reader.NodeType; 392if (nodeType == XmlNodeType.Text || nodeType == XmlNodeType.Whitespace || nodeType == XmlNodeType.SignificantWhitespace) 406case XmlNodeType.Element: 409case XmlNodeType.CDATA: 412case XmlNodeType.EntityReference: 415case XmlNodeType.XmlDeclaration: 416case XmlNodeType.ProcessingInstruction: 419case XmlNodeType.DocumentType: 422case XmlNodeType.Comment: 425case XmlNodeType.EndElement: 433while (d < reader.Depth || (d == reader.Depth && reader.NodeType == XmlNodeType.EndElement));
System\Xml\XmlExceptionHelper.cs (7)
67case XmlNodeType.Element: 69case XmlNodeType.EndElement: 71case XmlNodeType.Text: 72case XmlNodeType.Whitespace: 73case XmlNodeType.SignificantWhitespace: 75case XmlNodeType.Comment: 77case XmlNodeType.CDATA:
System.Private.Xml (1922)
System\Xml\BinaryXml\XmlBinaryReader.cs (64)
275private XmlNodeType _nodetype; 283private XmlNodeType _parentNodeType; // use for MoveToElement() 338_nodetype = XmlNodeType.None; 419public override XmlNodeType NodeType 476case XmlNodeType.DocumentType: 477case XmlNodeType.ProcessingInstruction: 478case XmlNodeType.Comment: 481case XmlNodeType.CDATA: 484case XmlNodeType.XmlDeclaration: 487case XmlNodeType.Text: 488case XmlNodeType.Whitespace: 489case XmlNodeType.SignificantWhitespace: 519if (_nodetype == XmlNodeType.Element 520|| _nodetype == XmlNodeType.EndElement) 530if (_parentNodeType != XmlNodeType.Element) 535if (_parentNodeType != XmlNodeType.Element) 802if (XmlNodeType.Element == _parentNodeType) 804else if (XmlNodeType.XmlDeclaration == _parentNodeType) 806else if (XmlNodeType.DocumentType == _parentNodeType) 859_nodetype = XmlNodeType.Text; 877_nodetype = XmlNodeType.None; 951_nodetype = XmlNodeType.None; 997if (this.NodeType == XmlNodeType.EndElement) 999if (this.NodeType == XmlNodeType.ProcessingInstruction || this.NodeType == XmlNodeType.Comment) 1001while (Read() && (this.NodeType == XmlNodeType.ProcessingInstruction || this.NodeType == XmlNodeType.Comment)) 1003if (this.NodeType == XmlNodeType.EndElement) 1032if (this.NodeType != XmlNodeType.Element && this.NodeType != XmlNodeType.EndElement) 1040case XmlNodeType.ProcessingInstruction: 1041case XmlNodeType.Comment: 1044case XmlNodeType.Element: 1045case XmlNodeType.EndElement: 1728if (this.NodeType == XmlNodeType.Element || this.NodeType == XmlNodeType.EndElement) 1767if (this.NodeType == XmlNodeType.Element || this.NodeType == XmlNodeType.EndElement) 2403_nodetype = XmlNodeType.Attribute; 2570_nodetype = XmlNodeType.XmlDeclaration; 2805case XmlNodeType.CDATA: 2808case XmlNodeType.EndElement: 2811case XmlNodeType.Element: 2822_nodetype = XmlNodeType.None; 2935if (XmlNodeType.Text == _nodetype) 3090_nodetype = XmlNodeType.Element; 3104_nodetype = XmlNodeType.EndElement; 3144_nodetype = XmlNodeType.DocumentType; 3153_nodetype = XmlNodeType.ProcessingInstruction; 3158_nodetype = XmlNodeType.Comment; 3166_nodetype = XmlNodeType.CDATA; 3219|| ((_textXmlReader.NodeType == XmlNodeType.XmlDeclaration) 3336private XmlNodeType ScanOverValue(BinXmlToken token, bool attr, bool checkChars) 3359return XmlNodeType.Text; 3368private XmlNodeType ScanOverAnyValue(BinXmlToken token, bool attr, bool checkChars) 3483return XmlNodeType.Text; 3486private XmlNodeType CheckText(bool attr) 3502return _xmlspacePreserve ? XmlNodeType.SignificantWhitespace : XmlNodeType.Whitespace; 3515return XmlNodeType.Text; 3541private XmlNodeType CheckTextIsWS() 3563return XmlNodeType.SignificantWhitespace; 3564return XmlNodeType.Whitespace; 3566return XmlNodeType.Text;
System\Xml\Core\ReadContentAsBinaryHelper.cs (15)
159if (_reader.NodeType != XmlNodeType.Element) 202if (_reader.NodeType != XmlNodeType.Element) 242if (_reader.NodeType != XmlNodeType.EndElement) 276Debug.Assert(_reader.NodeType == XmlNodeType.Element); 289if (_reader.NodeType != XmlNodeType.EndElement) 401if (_reader.NodeType != XmlNodeType.EndElement) 418case XmlNodeType.Attribute: 420case XmlNodeType.Text: 421case XmlNodeType.Whitespace: 422case XmlNodeType.SignificantWhitespace: 423case XmlNodeType.CDATA: 429case XmlNodeType.ProcessingInstruction: 430case XmlNodeType.Comment: 431case XmlNodeType.EndEntity: 434case XmlNodeType.EntityReference:
System\Xml\Core\ReadContentAsBinaryHelperAsync.cs (15)
112if (_reader.NodeType != XmlNodeType.Element) 156if (_reader.NodeType != XmlNodeType.Element) 197if (_reader.NodeType != XmlNodeType.EndElement) 224Debug.Assert(_reader.NodeType == XmlNodeType.Element); 237if (_reader.NodeType != XmlNodeType.EndElement) 323if (_reader.NodeType != XmlNodeType.EndElement) 340case XmlNodeType.Attribute: 342case XmlNodeType.Text: 343case XmlNodeType.Whitespace: 344case XmlNodeType.SignificantWhitespace: 345case XmlNodeType.CDATA: 351case XmlNodeType.ProcessingInstruction: 352case XmlNodeType.Comment: 353case XmlNodeType.EndEntity: 356case XmlNodeType.EntityReference:
System\Xml\Core\ValidatingReaderNodeData.cs (5)
26private XmlNodeType _nodeType; 33Clear(XmlNodeType.None); 36public ValidatingReaderNodeData(XmlNodeType nodeType) 130public XmlNodeType NodeType 174internal void Clear(XmlNodeType nodeType)
System\Xml\Core\XmlAsyncCheckReader.cs (3)
82public override XmlNodeType NodeType 619public override XmlNodeType MoveToContent() 891public override Task<XmlNodeType> MoveToContentAsync()
System\Xml\Core\XmlCharCheckingReader.cs (17)
41private XmlNodeType _lastNodeType; 61_lastNodeType = XmlNodeType.None; 192XmlNodeType nodeType = base.reader.NodeType; 198case XmlNodeType.Comment: 204case XmlNodeType.Whitespace: 210case XmlNodeType.ProcessingInstruction: 216case XmlNodeType.DocumentType: 233case XmlNodeType.Element: 253case XmlNodeType.Text: 254case XmlNodeType.CDATA: 261case XmlNodeType.EntityReference: 269case XmlNodeType.ProcessingInstruction: 281case XmlNodeType.Comment: 292case XmlNodeType.DocumentType: 325case XmlNodeType.Whitespace: 336case XmlNodeType.SignificantWhitespace: 343case XmlNodeType.EndElement:
System\Xml\Core\XmlCharCheckingReaderAsync.cs (15)
54XmlNodeType nodeType = base.reader.NodeType; 60case XmlNodeType.Comment: 66case XmlNodeType.Whitespace: 72case XmlNodeType.ProcessingInstruction: 78case XmlNodeType.DocumentType: 95case XmlNodeType.Element: 115case XmlNodeType.Text: 116case XmlNodeType.CDATA: 123case XmlNodeType.EntityReference: 131case XmlNodeType.ProcessingInstruction: 143case XmlNodeType.Comment: 154case XmlNodeType.DocumentType: 186case XmlNodeType.Whitespace: 197case XmlNodeType.SignificantWhitespace: 204case XmlNodeType.EndElement:
System\Xml\Core\XmlReader.cs (151)
93public abstract XmlNodeType NodeType { get; } 693if (NodeType == XmlNodeType.Element) 704if (NodeType == XmlNodeType.EndElement) 724public virtual XmlNodeType MoveToContent() 730case XmlNodeType.Attribute: 733case XmlNodeType.Element: 734case XmlNodeType.EndElement: 735case XmlNodeType.CDATA: 736case XmlNodeType.Text: 737case XmlNodeType.EntityReference: 738case XmlNodeType.EndEntity: 748if (MoveToContent() != XmlNodeType.Element) 758if (MoveToContent() != XmlNodeType.Element) 776if (MoveToContent() != XmlNodeType.Element) 796if (MoveToContent() != XmlNodeType.Element) 804if (NodeType != XmlNodeType.EndElement) 823if (MoveToContent() != XmlNodeType.Element) 836if (NodeType != XmlNodeType.EndElement) 855if (MoveToContent() != XmlNodeType.Element) 868if (NodeType != XmlNodeType.EndElement) 885if (MoveToContent() != XmlNodeType.EndElement) 895return MoveToContent() == XmlNodeType.Element; 902return MoveToContent() == XmlNodeType.Element && Name == name; 909return MoveToContent() == XmlNodeType.Element && LocalName == localname && NamespaceURI == ns; 923if (NodeType == XmlNodeType.Element && Ref.Equal(name, Name)) 944if (NodeType == XmlNodeType.Element && Ref.Equal(localName, LocalName) && Ref.Equal(namespaceURI, NamespaceURI)) 959if (NodeType != XmlNodeType.Element) 983if (NodeType == XmlNodeType.Element && Ref.Equal(name, Name)) 988Debug.Assert(NodeType == XmlNodeType.EndElement || NodeType == XmlNodeType.None || ReadState == ReadState.Error); 1000if (NodeType != XmlNodeType.Element) 1025if (NodeType == XmlNodeType.Element && Ref.Equal(localName, LocalName) && Ref.Equal(namespaceURI, NamespaceURI)) 1030Debug.Assert(NodeType == XmlNodeType.EndElement); 1043XmlNodeType nt; 1051if (nt == XmlNodeType.Element && Ref.Equal(name, Name)) 1055} while (nt != XmlNodeType.EndElement && !EOF); 1070XmlNodeType nt; 1078if (nt == XmlNodeType.Element && Ref.Equal(localName, LocalName) && Ref.Equal(namespaceURI, NamespaceURI)) 1082} while (nt != XmlNodeType.EndElement && !EOF); 1110if (NodeType != XmlNodeType.Attribute && NodeType != XmlNodeType.Element) 1121if (NodeType == XmlNodeType.Attribute) 1127if (NodeType == XmlNodeType.Element) 1139int d = NodeType == XmlNodeType.None ? -1 : Depth; 1144case XmlNodeType.Element: 1153case XmlNodeType.Text: 1156case XmlNodeType.Whitespace: 1157case XmlNodeType.SignificantWhitespace: 1160case XmlNodeType.CDATA: 1163case XmlNodeType.EntityReference: 1166case XmlNodeType.XmlDeclaration: 1167case XmlNodeType.ProcessingInstruction: 1170case XmlNodeType.DocumentType: 1173case XmlNodeType.Comment: 1176case XmlNodeType.EndElement: 1181if (d == Depth && NodeType == XmlNodeType.EndElement) 1193if (NodeType == XmlNodeType.EntityReference) 1213if (NodeType != XmlNodeType.Attribute && NodeType != XmlNodeType.Element) 1224if (NodeType == XmlNodeType.Attribute) 1269if (NodeType != XmlNodeType.Element) 1301internal static bool IsTextualNode(XmlNodeType nodeType) 1306Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.None))); 1307Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Element))); 1308Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Attribute))); 1309Debug.Assert(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Text))); 1310Debug.Assert(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.CDATA))); 1311Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EntityReference))); 1312Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Entity))); 1313Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.ProcessingInstruction))); 1314Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Comment))); 1315Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Document))); 1316Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.DocumentType))); 1317Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.DocumentFragment))); 1318Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Notation))); 1319Debug.Assert(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.Whitespace))); 1320Debug.Assert(0 != (IsTextualNodeBitmap & (1 << (int)XmlNodeType.SignificantWhitespace))); 1321Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EndElement))); 1322Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.EndEntity))); 1323Debug.Assert(0 == (IsTextualNodeBitmap & (1 << (int)XmlNodeType.XmlDeclaration))); 1328internal static bool CanReadContentAs(XmlNodeType nodeType) 1333Debug.Assert(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.None))); 1334Debug.Assert(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Element))); 1335Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Attribute))); 1336Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Text))); 1337Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.CDATA))); 1338Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.EntityReference))); 1339Debug.Assert(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Entity))); 1340Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.ProcessingInstruction))); 1341Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Comment))); 1342Debug.Assert(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Document))); 1343Debug.Assert(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.DocumentType))); 1344Debug.Assert(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.DocumentFragment))); 1345Debug.Assert(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Notation))); 1346Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.Whitespace))); 1347Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.SignificantWhitespace))); 1348Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.EndElement))); 1349Debug.Assert(0 != (CanReadContentAsBitmap & (1 << (int)XmlNodeType.EndEntity))); 1350Debug.Assert(0 == (CanReadContentAsBitmap & (1 << (int)XmlNodeType.XmlDeclaration))); 1355internal static bool HasValueInternal(XmlNodeType nodeType) 1360Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.None))); 1361Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.Element))); 1362Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.Attribute))); 1363Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.Text))); 1364Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.CDATA))); 1365Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.EntityReference))); 1366Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.Entity))); 1367Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.ProcessingInstruction))); 1368Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.Comment))); 1369Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.Document))); 1370Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.DocumentType))); 1371Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.DocumentFragment))); 1372Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.Notation))); 1373Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.Whitespace))); 1374Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.SignificantWhitespace))); 1375Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.EndElement))); 1376Debug.Assert(0 == (HasValueBitmap & (1 << (int)XmlNodeType.EndEntity))); 1377Debug.Assert(0 != (HasValueBitmap & (1 << (int)XmlNodeType.XmlDeclaration))); 1389if (NodeType == XmlNodeType.Element && !IsEmptyElement) 1399if (NodeType == XmlNodeType.EndElement) 1415if (NodeType != XmlNodeType.Element) 1441internal static Exception CreateReadContentAsException(string methodName, XmlNodeType nodeType, IXmlLineInfo? lineInfo) 1446internal static Exception CreateReadElementContentAsException(string methodName, XmlNodeType nodeType, IXmlLineInfo? lineInfo) 1473case XmlNodeType.Attribute: 1475case XmlNodeType.Text: 1476case XmlNodeType.Whitespace: 1477case XmlNodeType.SignificantWhitespace: 1478case XmlNodeType.CDATA: 1490case XmlNodeType.ProcessingInstruction: 1491case XmlNodeType.Comment: 1492case XmlNodeType.EndEntity: 1495case XmlNodeType.EntityReference: 1513if (NodeType != XmlNodeType.Element) 1528XmlNodeType nodeType = NodeType; 1530if (nodeType == XmlNodeType.EndElement) 1537if (nodeType == XmlNodeType.Element) 1547if (NodeType != XmlNodeType.EndElement) 1779XmlNodeType nt = _reader.NodeType; 1783case XmlNodeType.Element: 1784case XmlNodeType.EndElement: 1785case XmlNodeType.EntityReference: 1786case XmlNodeType.EndEntity: 1789case XmlNodeType.Attribute: 1790case XmlNodeType.ProcessingInstruction: 1793case XmlNodeType.Text: 1794case XmlNodeType.Whitespace: 1795case XmlNodeType.SignificantWhitespace: 1796case XmlNodeType.Comment: 1797case XmlNodeType.XmlDeclaration: 1798case XmlNodeType.CDATA: 1801case XmlNodeType.DocumentType:
System\Xml\Core\XmlReaderAsync.cs (44)
157public virtual async Task<XmlNodeType> MoveToContentAsync() 163case XmlNodeType.Attribute: 166case XmlNodeType.Element: 167case XmlNodeType.EndElement: 168case XmlNodeType.CDATA: 169case XmlNodeType.Text: 170case XmlNodeType.EntityReference: 171case XmlNodeType.EndEntity: 185if (NodeType != XmlNodeType.Attribute && NodeType != XmlNodeType.Element) 195if (NodeType == XmlNodeType.Attribute) 201if (NodeType == XmlNodeType.Element) 213int d = NodeType == XmlNodeType.None ? -1 : Depth; 218case XmlNodeType.Element: 227case XmlNodeType.Text: 230case XmlNodeType.Whitespace: 231case XmlNodeType.SignificantWhitespace: 234case XmlNodeType.CDATA: 237case XmlNodeType.EntityReference: 240case XmlNodeType.XmlDeclaration: 241case XmlNodeType.ProcessingInstruction: 244case XmlNodeType.DocumentType: 247case XmlNodeType.Comment: 250case XmlNodeType.EndElement: 255if (d == Depth && NodeType == XmlNodeType.EndElement) 268if (NodeType != XmlNodeType.Attribute && NodeType != XmlNodeType.Element) 278if (NodeType == XmlNodeType.Attribute) 300if (NodeType == XmlNodeType.Element && !IsEmptyElement) 310if (NodeType == XmlNodeType.EndElement) 329case XmlNodeType.Attribute: 331case XmlNodeType.Text: 332case XmlNodeType.Whitespace: 333case XmlNodeType.SignificantWhitespace: 334case XmlNodeType.CDATA: 346case XmlNodeType.ProcessingInstruction: 347case XmlNodeType.Comment: 348case XmlNodeType.EndEntity: 351case XmlNodeType.EntityReference: 369if (NodeType != XmlNodeType.Element) 384XmlNodeType nodeType = NodeType; 385if (nodeType == XmlNodeType.EndElement) 391if (nodeType == XmlNodeType.Element) 400if (NodeType != XmlNodeType.EndElement)
System\Xml\Core\XmlSubtreeReader.cs (43)
20internal XmlNodeType type; 27internal NodeData(XmlNodeType nodeType, string localName, string prefix, string name, string namespaceUri, string value) 37internal void Set(XmlNodeType nodeType, string localName, string prefix, string name, string namespaceUri, string value) 107_tmpNode = new NodeData(XmlNodeType.None, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty); 115public override XmlNodeType NodeType 170if (_curNode.type == XmlNodeType.Text) 432Debug.Assert(reader.NodeType == XmlNodeType.Element); 451else if (_curNode.type == XmlNodeType.Text) 457Debug.Assert(_curNode.type == XmlNodeType.Attribute); 458_tmpNode.type = XmlNodeType.Text; 482if (reader.NodeType == XmlNodeType.EndElement || 483(reader.NodeType == XmlNodeType.Element && reader.IsEmptyElement)) 489Debug.Assert(reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement); 552if (reader.Depth == _initialDepth && reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement) 590if (reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement) 595while (reader.NodeType != XmlNodeType.EndElement && reader.Depth > _initialDepth) 601Debug.Assert(reader.NodeType == XmlNodeType.EndElement || 602reader.NodeType == XmlNodeType.Element && reader.IsEmptyElement || 609if (reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement) 839case XmlNodeType.Element: 841case XmlNodeType.EndElement: 843case XmlNodeType.Attribute: 873goto case XmlNodeType.Text; 874case XmlNodeType.Text: 931if (NodeType != XmlNodeType.EndElement) 977case XmlNodeType.Element: 979case XmlNodeType.EndElement: 981case XmlNodeType.Attribute: 1011goto case XmlNodeType.Text; 1012case XmlNodeType.Text: 1068if (NodeType != XmlNodeType.EndElement) 1248case XmlNodeType.Element: 1292case XmlNodeType.EndElement: 1331_nsAttributes[index] = new NodeData(XmlNodeType.Attribute, localName, attrPrefix, name, _xmlnsUri, ns); 1335_nsAttributes[index].Set(XmlNodeType.Attribute, localName, attrPrefix, name, _xmlnsUri, ns); 1375if (NodeType != XmlNodeType.Element) 1390case XmlNodeType.Element: 1392case XmlNodeType.EndElement: 1418if (NodeType != XmlNodeType.EndElement) 1510_tmpNode.type = XmlNodeType.None; 1566case XmlNodeType.Element: 1570case XmlNodeType.EndElement: 1574case XmlNodeType.Attribute:
System\Xml\Core\XmlSubtreeReaderAsync.cs (24)
45if (reader.NodeType == XmlNodeType.EndElement || 46(reader.NodeType == XmlNodeType.Element && reader.IsEmptyElement)) 52Debug.Assert(reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement); 116if (reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement) 121while (reader.NodeType != XmlNodeType.EndElement && reader.Depth > _initialDepth) 127Debug.Assert(reader.NodeType == XmlNodeType.EndElement || 128reader.NodeType == XmlNodeType.Element && reader.IsEmptyElement || 135if (reader.NodeType == XmlNodeType.Element && !reader.IsEmptyElement) 245case XmlNodeType.Element: 247case XmlNodeType.EndElement: 249case XmlNodeType.Attribute: 279goto case XmlNodeType.Text; 280case XmlNodeType.Text: 337if (NodeType != XmlNodeType.EndElement) 383case XmlNodeType.Element: 385case XmlNodeType.EndElement: 387case XmlNodeType.Attribute: 417goto case XmlNodeType.Text; 418case XmlNodeType.Text: 474if (NodeType != XmlNodeType.EndElement) 559if (NodeType != XmlNodeType.Element) 574case XmlNodeType.Element: 576case XmlNodeType.EndElement: 602if (NodeType != XmlNodeType.EndElement)
System\Xml\Core\XmlTextReader.cs (3)
86public XmlTextReader(Stream xmlFragment, XmlNodeType fragType, XmlParserContext? context) 92public XmlTextReader([StringSyntax(StringSyntaxAttribute.Xml)] string xmlFragment, XmlNodeType fragType, XmlParserContext? context) 112public override XmlNodeType NodeType
System\Xml\Core\XmlTextReaderImpl.cs (142)
220private XmlNodeType _fragmentType = XmlNodeType.Document; 431_fragmentType = XmlNodeType.None; 435_fragmentType = XmlNodeType.Element; 439_fragmentType = XmlNodeType.Document; 505internal XmlTextReaderImpl(Stream xmlFragment, XmlNodeType fragType, XmlParserContext? context) 528internal XmlTextReaderImpl(string xmlFragment, XmlNodeType fragType, XmlParserContext? context) 556InitFragmentReader(XmlNodeType.XmlDeclaration, context, true); 835case XmlNodeType.None: settings.ConformanceLevel = ConformanceLevel.Auto; break; 836case XmlNodeType.Element: settings.ConformanceLevel = ConformanceLevel.Fragment; break; 837case XmlNodeType.Document: settings.ConformanceLevel = ConformanceLevel.Document; break; 838default: Debug.Fail($"Unexpected fragment type {_fragmentType}"); goto case XmlNodeType.None; 857public override XmlNodeType NodeType 964return _curNode.type == XmlNodeType.Attribute ? _curNode.quoteChar : '"'; 1182else if (_curNode.type != XmlNodeType.Attribute) 1270Debug.Assert(_curNode.type == XmlNodeType.Element); 1292_curNode.SetValueNode(XmlNodeType.Text, string.Empty); 1385case XmlNodeType.Element: 1394Debug.Assert(_curNode.type == XmlNodeType.EndElement); 1398case XmlNodeType.Attribute: 1400goto case XmlNodeType.Element; 1424if (_curNode.type != XmlNodeType.Attribute) 1444simpleValueNode.SetValueNode(XmlNodeType.Text, _curNode.StringValue); 1493if (_curNode.type != XmlNodeType.EntityReference) 1566if (_outerReader.NodeType == XmlNodeType.EntityReference && 1713if (_curNode.type != XmlNodeType.Element) 1760if (_curNode.type != XmlNodeType.Element) 2151_curNode.Clear(XmlNodeType.None); 2221if (_curNode.type != XmlNodeType.Element) 2255if (_curNode.type != XmlNodeType.Element) 2289if (_curNode.type != XmlNodeType.Element) 2498ParseCDataOrComment(XmlNodeType.Comment); 2506ParseCDataOrComment(XmlNodeType.Comment); 2966private void InitFragmentReader(XmlNodeType fragmentType, XmlParserContext? parserContext, bool allowXmlDeclFragment) 2998case XmlNodeType.Attribute: 3003case XmlNodeType.Element: 3007case XmlNodeType.Document: 3011case XmlNodeType.XmlDeclaration: 3603_curNode.SetNamedNode(XmlNodeType.XmlDeclaration, _xml); 3939if (_fragmentType != XmlNodeType.Document) 3950if (_fragmentType == XmlNodeType.None) 3952_fragmentType = XmlNodeType.Element; 3969if (_fragmentType == XmlNodeType.Document || _fragmentType == XmlNodeType.None) 3971_fragmentType = XmlNodeType.Document; 3999if (_fragmentType == XmlNodeType.Document) 4003if (_fragmentType == XmlNodeType.None) 4005_fragmentType = XmlNodeType.Element; 4016if (_fragmentType == XmlNodeType.Document) 4022if (_fragmentType == XmlNodeType.None) 4024_fragmentType = XmlNodeType.Element; 4056if (_fragmentType == XmlNodeType.Document) 4067if (_fragmentType == XmlNodeType.None && _curNode.type == XmlNodeType.Text) 4069_fragmentType = XmlNodeType.Element; 4099if (!_rootElementParsed && _fragmentType == XmlNodeType.Document) 4104if (_fragmentType == XmlNodeType.None) 4106_fragmentType = _rootElementParsed ? XmlNodeType.Document : XmlNodeType.Element; 4242if (_index == 0 && _fragmentType != XmlNodeType.Document) 4260if (_index == 0 && _curNode.type != XmlNodeType.Element) 4271if (el.type != XmlNodeType.Element) 4366_curNode.SetNamedNode(XmlNodeType.Element, 4375_curNode.SetNamedNode(XmlNodeType.Element, 4382_curNode.SetNamedNode(XmlNodeType.Element, 4452Debug.Assert(_curNode.type == XmlNodeType.Element); 4641startTagNode.type = XmlNodeType.EndElement; 4651if (startTag.type == XmlNodeType.Element) 4666Debug.Assert(startTag.type == XmlNodeType.EntityReference); 4728Debug.Assert(_curNode.type == XmlNodeType.Element); 4736Debug.Assert(_curNode.type == XmlNodeType.Element); 4962Debug.Assert(_curNode.type == XmlNodeType.Element); 4978if (at.type == XmlNodeType.Attribute && at.prefix.Length > 0) 5206textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 5218entityChunk.SetNamedNode(XmlNodeType.EntityReference, entityName); 5250textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 5259entityChunk.SetNamedNode(XmlNodeType.EntityReference, _ps.entity.Name); 5321if (_fragmentType == XmlNodeType.Attribute) 5358textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 5412XmlNodeType nodeType = GetTextNodeType(orChars); 5413if (nodeType == XmlNodeType.None) 5444XmlNodeType nodeType = GetTextNodeType(orChars); 5445if (nodeType == XmlNodeType.None) 5465_curNode.SetValueNode(XmlNodeType.Text, _ps.chars, startPos, endPos - startPos); 5486XmlNodeType nodeType = (_stringBuilder.Length < MinWhitespaceLookahedCount) ? GetTextNodeType(orChars) : XmlNodeType.Text; 5487if (nodeType == XmlNodeType.None) 5890if (_curNode.type != XmlNodeType.EndElement) 5902XmlNodeType nodeType = GetWhitespaceType(); 5905if (nodeType == XmlNodeType.None) 5947_curNode.SetNamedNode(XmlNodeType.EntityReference, ParseEntityName()); 6170_curNode.SetNamedNode(XmlNodeType.EndEntity, _lastEntity.Name); 6182Debug.Assert(_curNode.type == XmlNodeType.EntityReference); 6186_curNode.type = XmlNodeType.EndEntity; 6220_curNode.SetNamedNode(XmlNodeType.ProcessingInstruction, target); 6453ParseCDataOrComment(XmlNodeType.Comment); 6459ParseCDataOrComment(XmlNodeType.Comment); 6466ParseCDataOrComment(XmlNodeType.CDATA); 6470private void ParseCDataOrComment(XmlNodeType type) 6502private bool ParseCDataOrComment(XmlNodeType type, out int outStartPos, out int outEndPos) 6509Throw(SR.Xml_UnexpectedEOF, (type == XmlNodeType.Comment) ? "Comment" : "CDATA"); 6518char stopChar = (type == XmlNodeType.Comment) ? '-' : ']'; 6553else if (type == XmlNodeType.Comment) 6737_curNode.SetNamedNode(XmlNodeType.DocumentType, _dtdInfo.Name.ToString(), string.Empty, null); 7654newAttr.SetNamedNode(XmlNodeType.Attribute, _nameTable.Add(name)); 7696newAttr.SetNamedNode(XmlNodeType.Attribute, localName, prefix, nameWPrefix); 7714Debug.Assert(attr.type == XmlNodeType.Attribute); 7751_curNode.Clear(XmlNodeType.None); 7856private XmlNodeType GetWhitespaceType() 7862return XmlNodeType.SignificantWhitespace; 7867return XmlNodeType.Whitespace; 7871return XmlNodeType.None; 7874private XmlNodeType GetTextNodeType(int orChars) 7878return XmlNodeType.Text; 8229if (ParseCDataOrComment(XmlNodeType.Comment, out startPos, out pos)) 8237if (ParseCDataOrComment(XmlNodeType.CDATA, out startPos, out pos)) 8246_nextParsingFunction = (_index > 0 || _fragmentType != XmlNodeType.Document) ? ParsingFunction.ElementContent 8534Debug.Assert(_fragmentType == XmlNodeType.Attribute); 8537if (_curNode.type == XmlNodeType.None) 8539_curNode.type = XmlNodeType.Attribute; 8574_curNode.SetValueNode(XmlNodeType.Text, string.Empty); 8637_curNode.SetNamedNode(XmlNodeType.EntityReference, ParseEntityName()); 8719_curNode.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString()); 8918Debug.Assert(_curNode.type == XmlNodeType.Element); 8933if (_curNode.type != XmlNodeType.EndElement) 8954case XmlNodeType.Attribute: 8956case XmlNodeType.Text: 8957case XmlNodeType.Whitespace: 8958case XmlNodeType.SignificantWhitespace: 8959case XmlNodeType.CDATA: 8965case XmlNodeType.ProcessingInstruction: 8966case XmlNodeType.Comment: 8967case XmlNodeType.EndEntity: 8970case XmlNodeType.EntityReference: 9112internal XmlNodeType FragmentType 9120internal void ChangeCurrentNodeType(XmlNodeType newNodeType) 9122Debug.Assert(_curNode.type == XmlNodeType.Whitespace && newNodeType == XmlNodeType.SignificantWhitespace, "Incorrect node type change!"); 9186return _fragmentType == XmlNodeType.Element ? ConformanceLevel.Fragment : ConformanceLevel.Document; 9298Debug.Assert(_nodes[_index].type == XmlNodeType.Element); 9316Debug.Assert(_nodes[_index].type == XmlNodeType.Element); 9456if (_curNode.type != XmlNodeType.EndElement)
System\Xml\Core\XmlTextReaderImplAsync.cs (85)
203Debug.Assert(_curNode.type == XmlNodeType.Element); 225_curNode.SetValueNode(XmlNodeType.Text, string.Empty); 347case XmlNodeType.Element: 356Debug.Assert(_curNode.type == XmlNodeType.EndElement); 360case XmlNodeType.Attribute: 362goto case XmlNodeType.Element; 537if (_curNode.type != XmlNodeType.Element) 593if (_curNode.type != XmlNodeType.Element) 770await ParseCDataOrCommentAsync(XmlNodeType.Comment).ConfigureAwait(false); 778await ParseCDataOrCommentAsync(XmlNodeType.Comment).ConfigureAwait(false); 1188_curNode.SetNamedNode(XmlNodeType.XmlDeclaration, _xml); 1510if (_fragmentType != XmlNodeType.Document) 1535if (_fragmentType == XmlNodeType.Document || _fragmentType == XmlNodeType.None) 1537_fragmentType = XmlNodeType.Document; 1561if (_fragmentType == XmlNodeType.Document) 1565if (_fragmentType == XmlNodeType.None) 1567_fragmentType = XmlNodeType.Element; 1587if (_fragmentType == XmlNodeType.Document) 1603if (_fragmentType == XmlNodeType.None) 1605_fragmentType = XmlNodeType.Element; 1614if (_fragmentType == XmlNodeType.Document) 1621if (_fragmentType == XmlNodeType.None) 1623_fragmentType = XmlNodeType.Element; 1659if (_fragmentType == XmlNodeType.None && _curNode.type == XmlNodeType.Text) 1661_fragmentType = XmlNodeType.Element; 1680if (_fragmentType == XmlNodeType.None && _curNode.type == XmlNodeType.Text) 1682_fragmentType = XmlNodeType.Element; 1714if (!_rootElementParsed && _fragmentType == XmlNodeType.Document) 1718if (_fragmentType == XmlNodeType.None) 1720_fragmentType = _rootElementParsed ? XmlNodeType.Document : XmlNodeType.Element; 1839if (_index == 0 && _fragmentType != XmlNodeType.Document) 1959_curNode.SetNamedNode(XmlNodeType.Element, 1968_curNode.SetNamedNode(XmlNodeType.Element, 1975_curNode.SetNamedNode(XmlNodeType.Element, 2259startTagNode.type = XmlNodeType.EndElement; 2282if (startTag.type == XmlNodeType.Element) 2299Debug.Assert(startTag.type == XmlNodeType.EntityReference); 2361Debug.Assert(_curNode.type == XmlNodeType.Element); 2369Debug.Assert(_curNode.type == XmlNodeType.Element); 2722textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 2734entityChunk.SetNamedNode(XmlNodeType.EntityReference, entityName); 2766textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 2774entityChunk.SetNamedNode(XmlNodeType.EntityReference, _ps.entity!.Name); 2836if (_fragmentType == XmlNodeType.Attribute) 2875textChunk.SetValueNode(XmlNodeType.Text, _stringBuilder.ToString(valueChunkStartPos, valueChunkLen)); 2924XmlNodeType nodeType = GetTextNodeType(orChars); 2925if (nodeType == XmlNodeType.None) 2983XmlNodeType nodeType = GetTextNodeType(orChars); 2984if (nodeType == XmlNodeType.None) 3020XmlNodeType nodeType = GetTextNodeType(orChars); 3021if (nodeType == XmlNodeType.None) 3040_curNode.SetValueNode(XmlNodeType.Text, _ps.chars, startPos, endPos - startPos); 3067XmlNodeType nodeType = (_stringBuilder.Length < MinWhitespaceLookahedCount) ? GetTextNodeType(orChars) : XmlNodeType.Text; 3068if (nodeType == XmlNodeType.None) 3667if (_curNode.type != XmlNodeType.EndElement) 3679XmlNodeType nodeType = GetWhitespaceType(); 3681if (nodeType == XmlNodeType.None) 3722_curNode.SetNamedNode(XmlNodeType.EntityReference, await ParseEntityNameAsync().ConfigureAwait(false)); 3924_curNode.SetNamedNode(XmlNodeType.ProcessingInstruction, target); 4178await ParseCDataOrCommentAsync(XmlNodeType.Comment).ConfigureAwait(false); 4184await ParseCDataOrCommentAsync(XmlNodeType.Comment).ConfigureAwait(false); 4191return ParseCDataOrCommentAsync(XmlNodeType.CDATA); 4195private async Task ParseCDataOrCommentAsync(XmlNodeType type) 4242private async Task<(int, int, bool)> ParseCDataOrCommentTupleAsync(XmlNodeType type) 4252Throw(SR.Xml_UnexpectedEOF, (type == XmlNodeType.Comment) ? "Comment" : "CDATA"); 4260char stopChar = (type == XmlNodeType.Comment) ? '-' : ']'; 4296else if (type == XmlNodeType.Comment) 4478_curNode.SetNamedNode(XmlNodeType.DocumentType, _dtdInfo.Name.ToString(), string.Empty, null); 5297Debug.Assert(_curNode.type == XmlNodeType.Element); 5311if (_curNode.type != XmlNodeType.EndElement) 5330case XmlNodeType.Attribute: 5332case XmlNodeType.Text: 5333case XmlNodeType.Whitespace: 5334case XmlNodeType.SignificantWhitespace: 5335case XmlNodeType.CDATA: 5341case XmlNodeType.ProcessingInstruction: 5342case XmlNodeType.Comment: 5343case XmlNodeType.EndEntity: 5346case XmlNodeType.EntityReference: 5465if (_curNode.type != XmlNodeType.EndElement)
System\Xml\Core\XmlTextReaderImplHelpers.cs (11)
344internal XmlNodeType type; 389Clear(XmlNodeType.None); 413return type == XmlNodeType.Element && _isEmptyOrDefault; 417Debug.Assert(type == XmlNodeType.Element); 426return type == XmlNodeType.Attribute && _isEmptyOrDefault; 430Debug.Assert(type == XmlNodeType.Attribute); 477internal void Clear(XmlNodeType type) 509internal void SetValueNode(XmlNodeType type, string value) 519internal void SetValueNode(XmlNodeType type, char[] chars, int startPos, int len) 530internal void SetNamedNode(XmlNodeType type, string localName) 535internal void SetNamedNode(XmlNodeType type, string localName, string prefix, string? nameWPrefix)
System\Xml\Core\XmlValidatingReader.cs (3)
31public XmlValidatingReader([StringSyntax(StringSyntaxAttribute.Xml)] string xmlFragment, XmlNodeType fragType, XmlParserContext context) 39public XmlValidatingReader(Stream xmlFragment, XmlNodeType fragType, XmlParserContext context) 50public override XmlNodeType NodeType
System\Xml\Core\XmlValidatingReaderImpl.cs (21)
164internal XmlValidatingReaderImpl(string xmlFragment, XmlNodeType fragType, XmlParserContext? context) 182internal XmlValidatingReaderImpl(Stream xmlFragment, XmlNodeType fragType, XmlParserContext? context) 287public override XmlNodeType NodeType 754if (_outerReader.NodeType == XmlNodeType.EntityReference && _parsingFunction != ParsingFunction.ResolveEntityInternally) 954case XmlNodeType.Attribute: 956case XmlNodeType.Element: 974XmlNodeType type = _outerReader.NodeType; 975if (type != XmlNodeType.CDATA && type != XmlNodeType.Text && 976type != XmlNodeType.Whitespace && type != XmlNodeType.SignificantWhitespace && 977type != XmlNodeType.Comment && type != XmlNodeType.ProcessingInstruction) 983if (_outerReader.NodeType != XmlNodeType.EndElement) 992case XmlNodeType.EndElement: 1052Debug.Assert(_coreReader.NodeType == XmlNodeType.EntityReference); 1098case XmlNodeType.Whitespace: 1099if (_coreReader.Depth > 0 || _coreReaderImpl.FragmentType != XmlNodeType.Document) 1103_coreReaderImpl.ChangeCurrentNodeType(XmlNodeType.SignificantWhitespace); 1107case XmlNodeType.DocumentType: 1110case XmlNodeType.EntityReference:
System\Xml\Core\XmlValidatingReaderImplAsync.cs (1)
193Debug.Assert(_coreReader.NodeType == XmlNodeType.EntityReference);
System\Xml\Core\XmlWrappingReader.cs (1)
34public override XmlNodeType NodeType { get { return reader.NodeType; } }
System\Xml\Core\XmlWriter.cs (17)
317if (reader.NodeType is XmlNodeType.Element or XmlNodeType.XmlDeclaration) 325else if (reader.NodeType != XmlNodeType.Attribute) 340if (reader.NodeType == XmlNodeType.EntityReference) 363int d = reader.NodeType == XmlNodeType.None ? -1 : reader.Depth; 368case XmlNodeType.Element: 376case XmlNodeType.Text: 391case XmlNodeType.Whitespace: 392case XmlNodeType.SignificantWhitespace: 397case XmlNodeType.CDATA: 400case XmlNodeType.EntityReference: 403case XmlNodeType.XmlDeclaration: 404case XmlNodeType.ProcessingInstruction: 407case XmlNodeType.DocumentType: 411case XmlNodeType.Comment: 414case XmlNodeType.EndElement: 418} while (reader.Read() && (d < reader.Depth || (d == reader.Depth && reader.NodeType == XmlNodeType.EndElement)));
System\Xml\Core\XmlWriterAsync.cs (30)
238if (reader.NodeType is XmlNodeType.Element or XmlNodeType.XmlDeclaration) 246else if (reader.NodeType != XmlNodeType.Attribute) 261if (reader.NodeType == XmlNodeType.EntityReference) 299int d = reader.NodeType == XmlNodeType.None ? -1 : reader.Depth; 304case XmlNodeType.Element: 312case XmlNodeType.Text: 327case XmlNodeType.Whitespace: 328case XmlNodeType.SignificantWhitespace: 331case XmlNodeType.CDATA: 334case XmlNodeType.EntityReference: 337case XmlNodeType.XmlDeclaration: 338case XmlNodeType.ProcessingInstruction: 341case XmlNodeType.DocumentType: 345case XmlNodeType.Comment: 348case XmlNodeType.EndElement: 352} while (reader.Read() && (d < reader.Depth || (d == reader.Depth && reader.NodeType == XmlNodeType.EndElement))); 361int d = reader.NodeType == XmlNodeType.None ? -1 : reader.Depth; 366case XmlNodeType.Element: 374case XmlNodeType.Text: 390case XmlNodeType.Whitespace: 391case XmlNodeType.SignificantWhitespace: 394case XmlNodeType.CDATA: 397case XmlNodeType.EntityReference: 400case XmlNodeType.XmlDeclaration: 401case XmlNodeType.ProcessingInstruction: 404case XmlNodeType.DocumentType: 408case XmlNodeType.Comment: 411case XmlNodeType.EndElement: 415} while (await reader.ReadAsync().ConfigureAwait(false) && (d < reader.Depth || (d == reader.Depth && reader.NodeType == XmlNodeType.EndElement)));
System\Xml\Core\XsdCachingReader.cs (29)
81if (_coreReader.NodeType == XmlNodeType.Element) 108public override XmlNodeType NodeType 387if (_cacheState != CachingReaderState.Replay || _cachedNode!.NodeType != XmlNodeType.Attribute) 413case XmlNodeType.Element: 418case XmlNodeType.EndElement: 424case XmlNodeType.Comment: 425case XmlNodeType.ProcessingInstruction: 426case XmlNodeType.Text: 427case XmlNodeType.CDATA: 428case XmlNodeType.Whitespace: 429case XmlNodeType.SignificantWhitespace: 453if (_coreReader.NodeType != XmlNodeType.Element || _readAhead) 474ValidatingReaderNodeData textNode = AddContent(XmlNodeType.Text); 483Debug.Assert(_coreReader.NodeType == XmlNodeType.EndElement || (_coreReader.NodeType == XmlNodeType.Element && _coreReader.IsEmptyElement)); 488Debug.Assert(endElementNode.NodeType == XmlNodeType.EndElement); 495ValidatingReaderNodeData recordedNode = AddContent(XmlNodeType.EndElement); 496Debug.Assert(_coreReader.NodeType == XmlNodeType.EndElement || (_coreReader.NodeType == XmlNodeType.Element && _coreReader.IsEmptyElement)); 544case XmlNodeType.Element: 545if (_coreReader.NodeType != XmlNodeType.EndElement && !_readAhead) 556case XmlNodeType.Attribute: 558goto case XmlNodeType.Element; 592if (_cachedNode!.NodeType != XmlNodeType.Attribute) 657attInfo.Clear(XmlNodeType.Attribute); 666return _attributeEvents[attIndex] ??= new ValidatingReaderNodeData(XmlNodeType.Attribute); 669private ValidatingReaderNodeData AddContent(XmlNodeType nodeType) 692Debug.Assert(_coreReader.NodeType == XmlNodeType.Element); 752_textNode ??= new ValidatingReaderNodeData(XmlNodeType.Text);
System\Xml\Core\XsdCachingReaderAsync.cs (13)
45case XmlNodeType.Element: 50case XmlNodeType.EndElement: 56case XmlNodeType.Comment: 57case XmlNodeType.ProcessingInstruction: 58case XmlNodeType.Text: 59case XmlNodeType.CDATA: 60case XmlNodeType.Whitespace: 61case XmlNodeType.SignificantWhitespace: 85if (_coreReader.NodeType != XmlNodeType.Element || _readAhead) 110case XmlNodeType.Element: 111if (_coreReader.NodeType != XmlNodeType.EndElement && !_readAhead) 122case XmlNodeType.Attribute: 124goto case XmlNodeType.Element;
System\Xml\Core\XsdValidatingReader.cs (90)
213public override XmlNodeType NodeType 224XmlNodeType nodeType = _coreReader.NodeType; 226if (nodeType == XmlNodeType.Whitespace && (_validator.CurrentContentType == XmlSchemaContentType.TextOnly || _validator.CurrentContentType == XmlSchemaContentType.Mixed)) 228return XmlNodeType.SignificantWhitespace; 421case XmlNodeType.Element: 422case XmlNodeType.EndElement: 431case XmlNodeType.Attribute: 464XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 498XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 532XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 566XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 600XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 634XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 668XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 703XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 739XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 774if (this.NodeType != XmlNodeType.Element) 785if (this.NodeType != XmlNodeType.Element) 820if (this.NodeType != XmlNodeType.Element) 855if (this.NodeType != XmlNodeType.Element) 890if (this.NodeType != XmlNodeType.Element) 925if (this.NodeType != XmlNodeType.Element) 960if (this.NodeType != XmlNodeType.Element) 995if (this.NodeType != XmlNodeType.Element) 1030if (this.NodeType != XmlNodeType.Element) 1065if (this.NodeType != XmlNodeType.Element) 1512case XmlNodeType.Element: 1535case XmlNodeType.Attribute: 1537goto case XmlNodeType.Element; 1575if (NodeType == XmlNodeType.Attribute) 1716case XmlNodeType.Element: 1724case XmlNodeType.EndElement: 1727case XmlNodeType.Attribute: 1749case XmlNodeType.Element: 1750case XmlNodeType.EndElement: 1767case XmlNodeType.Element: 1781case XmlNodeType.EndElement: 1784case XmlNodeType.Attribute: 1803case XmlNodeType.Element: 1811case XmlNodeType.EndElement: 1814case XmlNodeType.Attribute: 1834case XmlNodeType.Element: 1835case XmlNodeType.EndElement: 1838case XmlNodeType.Attribute: 1856if (NodeType == XmlNodeType.Element || NodeType == XmlNodeType.EndElement) 1869if (NodeType == XmlNodeType.Attribute) 2007case XmlNodeType.Element: 2012case XmlNodeType.Whitespace: 2013case XmlNodeType.SignificantWhitespace: 2017case XmlNodeType.Text: // text inside a node 2018case XmlNodeType.CDATA: // <![CDATA[...]]> 2022case XmlNodeType.EndElement: 2027case XmlNodeType.EntityReference: 2030case XmlNodeType.DocumentType: 2333if (_coreReader.NodeType == XmlNodeType.Element) 2366XmlNodeType nodeType = this.NodeType; 2367if (nodeType == XmlNodeType.Attribute) 2386else if (nodeType == XmlNodeType.EndElement) 2440Debug.Assert(this.NodeType == XmlNodeType.Element); 2467if (this.NodeType == XmlNodeType.EndElement) 2491else if (this.NodeType == XmlNodeType.Element) 2501if (this.NodeType != XmlNodeType.EndElement) 2529case XmlNodeType.Element: 2533case XmlNodeType.Text: 2534case XmlNodeType.CDATA: 2538case XmlNodeType.Whitespace: 2539case XmlNodeType.SignificantWhitespace: 2543case XmlNodeType.Comment: 2544case XmlNodeType.ProcessingInstruction: 2547case XmlNodeType.EndElement: 2587Debug.Assert(_coreReader.NodeType == XmlNodeType.EndElement); 2597case XmlNodeType.Element: 2601case XmlNodeType.Text: 2602case XmlNodeType.CDATA: 2606case XmlNodeType.Whitespace: 2607case XmlNodeType.SignificantWhitespace: 2611case XmlNodeType.Comment: 2612case XmlNodeType.ProcessingInstruction: 2615case XmlNodeType.EndElement: 2658case XmlNodeType.Element: 2662case XmlNodeType.Text: 2663case XmlNodeType.CDATA: 2667case XmlNodeType.Whitespace: 2668case XmlNodeType.SignificantWhitespace: 2672case XmlNodeType.Comment: 2673case XmlNodeType.ProcessingInstruction: 2676case XmlNodeType.EndElement: 2740Debug.Assert(NodeType != XmlNodeType.Attribute); 2764_textNode ??= new ValidatingReaderNodeData(XmlNodeType.Text);
System\Xml\Core\XsdValidatingReaderAsync.cs (32)
49XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 89XmlSchemaType? xmlType = NodeType == XmlNodeType.Attribute ? AttributeXmlType : ElementXmlType; 124if (this.NodeType != XmlNodeType.Element) 136if (this.NodeType != XmlNodeType.Element) 176if (this.NodeType != XmlNodeType.Element) 350case XmlNodeType.Element: 373case XmlNodeType.Attribute: 375goto case XmlNodeType.Element; 502case XmlNodeType.Element: 506case XmlNodeType.Whitespace: 507case XmlNodeType.SignificantWhitespace: 511case XmlNodeType.Text: // text inside a node 512case XmlNodeType.CDATA: // <![CDATA[...]]> 516case XmlNodeType.EndElement: 520case XmlNodeType.EntityReference: 523case XmlNodeType.DocumentType: 656if (_coreReader.NodeType == XmlNodeType.Element) 692XmlNodeType nodeType = this.NodeType; 693if (nodeType == XmlNodeType.Attribute) 712else if (nodeType == XmlNodeType.EndElement) 776Debug.Assert(this.NodeType == XmlNodeType.Element); 801if (this.NodeType == XmlNodeType.EndElement) 826else if (this.NodeType == XmlNodeType.Element) 839if (this.NodeType != XmlNodeType.EndElement) 867case XmlNodeType.Element: 871case XmlNodeType.Text: 872case XmlNodeType.CDATA: 876case XmlNodeType.Whitespace: 877case XmlNodeType.SignificantWhitespace: 881case XmlNodeType.Comment: 882case XmlNodeType.ProcessingInstruction: 885case XmlNodeType.EndElement:
System\Xml\Dom\DocumentSchemaValidator.cs (27)
94case XmlNodeType.Document: 98case XmlNodeType.DocumentFragment: 101case XmlNodeType.Element: //Validate children of this element 123if (nodeToValidate.ParentNode!.NodeType == XmlNodeType.Document) 140case XmlNodeType.Attribute: 179case XmlNodeType.Element: 210case XmlNodeType.Attribute: 266case XmlNodeType.Document: 276case XmlNodeType.DocumentFragment: 277case XmlNodeType.EntityReference: 285case XmlNodeType.Element: 289case XmlNodeType.Attribute: //Top-level attribute 298case XmlNodeType.Text: 302case XmlNodeType.CDATA: 306case XmlNodeType.Whitespace: 307case XmlNodeType.SignificantWhitespace: 311case XmlNodeType.Comment: 312case XmlNodeType.ProcessingInstruction: 485Debug.Assert(elementToValidate.ParentNode!.NodeType != XmlNodeType.Document); //Handle if it is the documentElement separately 730case XmlNodeType.EntityReference: 734case XmlNodeType.Element: //Flat validation, do not drill down into children 738case XmlNodeType.Text: 739case XmlNodeType.CDATA: 743case XmlNodeType.Whitespace: 744case XmlNodeType.SignificantWhitespace: 748case XmlNodeType.Comment: 749case XmlNodeType.ProcessingInstruction:
System\Xml\Dom\DocumentXmlWriter.cs (6)
538XmlNodeType nodeType = XmlNodeType.None; 550if (nodeType == XmlNodeType.Document) 554else if (nodeType == XmlNodeType.DocumentFragment) 563if (nodeType == XmlNodeType.Document) 567else if (nodeType == XmlNodeType.DocumentFragment)
System\Xml\Dom\DocumentXPathNavigator.cs (126)
50case XmlNodeType.Attribute: 57case XmlNodeType.Text: 58case XmlNodeType.CDATA: 59case XmlNodeType.Whitespace: 60case XmlNodeType.SignificantWhitespace: 73goto case XmlNodeType.Element; 74case XmlNodeType.Element: 75case XmlNodeType.ProcessingInstruction: 76case XmlNodeType.Comment: 129case XmlNodeType.Element: 130case XmlNodeType.ProcessingInstruction: 132case XmlNodeType.Attribute: 168case XmlNodeType.Element: 169case XmlNodeType.DocumentFragment: 171case XmlNodeType.Document: 173case XmlNodeType.Text: 174case XmlNodeType.CDATA: 175case XmlNodeType.Whitespace: 176case XmlNodeType.SignificantWhitespace: 367&& node.NodeType != XmlNodeType.Element) 778if (_source.NodeType == XmlNodeType.Attribute) 806case XmlNodeType.Element: 813case XmlNodeType.DocumentFragment: 814case XmlNodeType.Document: 906if (_source.NodeType == XmlNodeType.Attribute) 916if (child.NodeType == XmlNodeType.Element 932if (_source.NodeType == XmlNodeType.Attribute) 970case XmlNodeType.Attribute: 982if (following.NodeType == XmlNodeType.Attribute) 1026while (following.NodeType != XmlNodeType.Element 1045case XmlNodeType.Attribute: 1064case XmlNodeType.Attribute: 1071case XmlNodeType.Text: 1072case XmlNodeType.CDATA: 1073case XmlNodeType.SignificantWhitespace: 1074case XmlNodeType.Whitespace: 1129if (sibling.NodeType == XmlNodeType.Element 1184case XmlNodeType.Element: 1191case XmlNodeType.DocumentFragment: 1192case XmlNodeType.Document: 1247if (_source.NodeType == XmlNodeType.Document) 1453if (nsAtom == null || _source.NodeType == XmlNodeType.Attribute) 1478XmlNodeType curNT = _source.NodeType; 1479if (curNT != XmlNodeType.Document && curNT != XmlNodeType.Element) 1504case XmlNodeType.Element: 1505case XmlNodeType.Document: 1506case XmlNodeType.DocumentFragment: 1521case XmlNodeType.Element: 1522case XmlNodeType.Document: 1523case XmlNodeType.DocumentFragment: 1540case XmlNodeType.Attribute: 1541case XmlNodeType.Document: 1542case XmlNodeType.DocumentFragment: 1544case XmlNodeType.Text: 1545case XmlNodeType.CDATA: 1546case XmlNodeType.SignificantWhitespace: 1547case XmlNodeType.Whitespace: 1563case XmlNodeType.Attribute: 1564case XmlNodeType.Document: 1565case XmlNodeType.DocumentFragment: 1567case XmlNodeType.Text: 1568case XmlNodeType.CDATA: 1569case XmlNodeType.SignificantWhitespace: 1570case XmlNodeType.Whitespace: 1585if (_source.NodeType != XmlNodeType.Element) 1613case XmlNodeType.Attribute: 1614case XmlNodeType.Document: 1615case XmlNodeType.DocumentFragment: 1617case XmlNodeType.Text: 1618case XmlNodeType.CDATA: 1619case XmlNodeType.SignificantWhitespace: 1620case XmlNodeType.Whitespace: 1664case XmlNodeType.Attribute: 1677case XmlNodeType.Text: 1678case XmlNodeType.CDATA: 1679case XmlNodeType.SignificantWhitespace: 1680case XmlNodeType.Whitespace: 1682goto case XmlNodeType.Element; 1683case XmlNodeType.Element: 1684case XmlNodeType.ProcessingInstruction: 1685case XmlNodeType.Comment: 1723case XmlNodeType.Attribute: 1736case XmlNodeType.Text: 1737case XmlNodeType.CDATA: 1738case XmlNodeType.SignificantWhitespace: 1739case XmlNodeType.Whitespace: 1744goto case XmlNodeType.Element; 1745case XmlNodeType.Element: 1746case XmlNodeType.ProcessingInstruction: 1747case XmlNodeType.Comment: 1911&& parent.NodeType == XmlNodeType.EntityReference) 1932&& child.NodeType == XmlNodeType.EntityReference) 1957|| current.NodeType != XmlNodeType.EntityReference) 1964&& sibling.NodeType == XmlNodeType.EntityReference) 1989|| current.NodeType != XmlNodeType.EntityReference) 1996&& sibling.NodeType == XmlNodeType.EntityReference) 2030|| current.NodeType != XmlNodeType.EntityReference) 2040case XmlNodeType.EntityReference: 2043case XmlNodeType.Text: 2044case XmlNodeType.CDATA: 2045case XmlNodeType.Whitespace: 2046case XmlNodeType.SignificantWhitespace: 2103case XmlNodeType.Element: 2105case XmlNodeType.DocumentFragment: 2108case XmlNodeType.Element: 2109case XmlNodeType.Text: 2110case XmlNodeType.CDATA: 2111case XmlNodeType.ProcessingInstruction: 2112case XmlNodeType.Comment: 2113case XmlNodeType.Whitespace: 2114case XmlNodeType.SignificantWhitespace: 2118case XmlNodeType.Document: 2121case XmlNodeType.Element: 2122case XmlNodeType.ProcessingInstruction: 2123case XmlNodeType.Comment: 2243if (node.NodeType == XmlNodeType.Element && Match(node)) 2257Debug.Assert(((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute); 2271return (node.NodeType == XmlNodeType.Element); 2295if (node.NodeType == XmlNodeType.Element && Match(node)) 2311Debug.Assert(((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute); 2327Debug.Assert(node.NodeType == XmlNodeType.Element); 2352if (node.NodeType == XmlNodeType.Element && Match(node)) 2369Debug.Assert(((XmlNode)nav.UnderlyingObject).NodeType != XmlNodeType.Attribute); 2392Debug.Assert(node.NodeType == XmlNodeType.Element); 2419if (node.NodeType == XmlNodeType.Element && Match(node))
System\Xml\Dom\XmlAttribute.cs (5)
94public override XmlNodeType NodeType 96get { return XmlNodeType.Attribute; } 212internal override bool IsValidChildType(XmlNodeType type) 214return (type == XmlNodeType.Text) || (type == XmlNodeType.EntityReference);
System\Xml\Dom\XmlCDataSection.cs (7)
36public override XmlNodeType NodeType 40return XmlNodeType.CDATA; 50case XmlNodeType.Document: 52case XmlNodeType.Text: 53case XmlNodeType.CDATA: 54case XmlNodeType.Whitespace: 55case XmlNodeType.SignificantWhitespace:
System\Xml\Dom\XmlCharacterData.cs (6)
201Debug.Assert(XmlDocument.IsTextNode(n.NodeType) || (n.ParentNode != null && n.ParentNode.NodeType == XmlNodeType.EntityReference)); 206case XmlNodeType.Whitespace: 208case XmlNodeType.SignificantWhitespace: 211case XmlNodeType.Text: 212case XmlNodeType.CDATA: 215case XmlNodeType.EntityReference:
System\Xml\Dom\XmlComment.cs (2)
29public override XmlNodeType NodeType 31get { return XmlNodeType.Comment; }
System\Xml\Dom\XmlDeclaration.cs (2)
152public override XmlNodeType NodeType 154get { return XmlNodeType.XmlDeclaration; }
System\Xml\Dom\XmlDocument.cs (98)
356public override XmlNodeType NodeType 358get { return XmlNodeType.Document; } 369get { return (XmlDocumentType?)FindChild(XmlNodeType.DocumentType); } 406get { return (XmlElement?)FindChild(XmlNodeType.Element); } 462internal override bool IsValidChildType(XmlNodeType type) 466case XmlNodeType.ProcessingInstruction: 467case XmlNodeType.Comment: 468case XmlNodeType.Whitespace: 469case XmlNodeType.SignificantWhitespace: 472case XmlNodeType.DocumentType: 477case XmlNodeType.Element: 482case XmlNodeType.XmlDeclaration: 493private static bool HasNodeTypeInPrevSiblings(XmlNodeType nt, XmlNode? refNode) 514private static bool HasNodeTypeInNextSiblings(XmlNodeType nt, XmlNode? refNode) 535case XmlNodeType.XmlDeclaration: 538case XmlNodeType.ProcessingInstruction: 539case XmlNodeType.Comment: 540return refChild.NodeType != XmlNodeType.XmlDeclaration; 542case XmlNodeType.DocumentType: 544if (refChild.NodeType != XmlNodeType.XmlDeclaration) 548return !HasNodeTypeInPrevSiblings(XmlNodeType.Element, refChild.PreviousSibling); 553case XmlNodeType.Element: 555if (refChild.NodeType != XmlNodeType.XmlDeclaration) 559return !HasNodeTypeInNextSiblings(XmlNodeType.DocumentType, refChild); 577case XmlNodeType.ProcessingInstruction: 578case XmlNodeType.Comment: 579case XmlNodeType.Whitespace: 580case XmlNodeType.SignificantWhitespace: 583case XmlNodeType.DocumentType: 587return !HasNodeTypeInPrevSiblings(XmlNodeType.Element, refChild); 590case XmlNodeType.Element: 592return !HasNodeTypeInNextSiblings(XmlNodeType.DocumentType, refChild.NextSibling); 761XmlNodeType nodeType = node.NodeType; 763XmlNodeType parentType; 767case XmlNodeType.EntityReference: 768case XmlNodeType.Entity: 769case XmlNodeType.DocumentType: 770case XmlNodeType.Notation: 771case XmlNodeType.XmlDeclaration: 773case XmlNodeType.Text: 774case XmlNodeType.CDATA: 775case XmlNodeType.SignificantWhitespace: 782if (parentType == XmlNodeType.Attribute) 786else if (parentType == XmlNodeType.EntityReference) 799case XmlNodeType.Whitespace: 806if (parentType == XmlNodeType.Document 807|| parentType == XmlNodeType.Attribute) 811else if (parentType == XmlNodeType.EntityReference) 830internal static bool IsTextNode(XmlNodeType nt) 834case XmlNodeType.Text: 835case XmlNodeType.CDATA: 836case XmlNodeType.Whitespace: 837case XmlNodeType.SignificantWhitespace: 859if (intnode.ParentNode != null && intnode.ParentNode.NodeType == XmlNodeType.EntityReference) 881while (n.NodeType == XmlNodeType.EntityReference) 969case XmlNodeType.Element: 976case XmlNodeType.Attribute: 982case XmlNodeType.Text: 985case XmlNodeType.Comment: 988case XmlNodeType.ProcessingInstruction: 991case XmlNodeType.XmlDeclaration: 995case XmlNodeType.CDATA: 998case XmlNodeType.DocumentType: 1002case XmlNodeType.DocumentFragment: 1008case XmlNodeType.EntityReference: 1014case XmlNodeType.Whitespace: 1018case XmlNodeType.SignificantWhitespace: 1042Debug.Assert(toNode.NodeType != XmlNodeType.EntityReference); 1111public virtual XmlNode CreateNode(XmlNodeType type, string? prefix, string name, string? namespaceURI) 1115case XmlNodeType.Element: 1121case XmlNodeType.Attribute: 1127case XmlNodeType.Text: 1130case XmlNodeType.CDATA: 1133case XmlNodeType.EntityReference: 1136case XmlNodeType.ProcessingInstruction: 1139case XmlNodeType.XmlDeclaration: 1142case XmlNodeType.Comment: 1145case XmlNodeType.DocumentFragment: 1148case XmlNodeType.DocumentType: 1151case XmlNodeType.Document: 1154case XmlNodeType.SignificantWhitespace: 1157case XmlNodeType.Whitespace: 1174public virtual XmlNode CreateNode(XmlNodeType type, string name, string? namespaceURI) 1198internal static XmlNodeType ConvertToNodeType(string nodeTypeString) 1202return XmlNodeType.Element; 1206return XmlNodeType.Attribute; 1210return XmlNodeType.Text; 1214return XmlNodeType.CDATA; 1218return XmlNodeType.EntityReference; 1222return XmlNodeType.Entity; 1226return XmlNodeType.ProcessingInstruction; 1230return XmlNodeType.Comment; 1234return XmlNodeType.Document; 1238return XmlNodeType.DocumentType; 1242return XmlNodeType.DocumentFragment; 1246return XmlNodeType.Notation; 1250return XmlNodeType.SignificantWhitespace; 1254return XmlNodeType.Whitespace;
System\Xml\Dom\XmlDocumentFragment.cs (16)
69public override XmlNodeType NodeType 71get { return XmlNodeType.DocumentFragment; } 102loader.ParsePartialContent(this, value, XmlNodeType.Element); 128internal override bool IsValidChildType(XmlNodeType type) 132case XmlNodeType.Element: 133case XmlNodeType.Text: 134case XmlNodeType.EntityReference: 135case XmlNodeType.Comment: 136case XmlNodeType.Whitespace: 137case XmlNodeType.SignificantWhitespace: 138case XmlNodeType.ProcessingInstruction: 139case XmlNodeType.CDATA: 142case XmlNodeType.XmlDeclaration: 145if (firstNode == null || firstNode.NodeType != XmlNodeType.XmlDeclaration) 156if (newChild.NodeType == XmlNodeType.XmlDeclaration) 172if (newChild.NodeType == XmlNodeType.XmlDeclaration)
System\Xml\Dom\XmlDocumentType.cs (2)
53public override XmlNodeType NodeType 55get { return XmlNodeType.DocumentType; }
System\Xml\Dom\XmlElement.cs (12)
110public override XmlNodeType NodeType 112get { return XmlNodeType.Element; } 217internal override bool IsValidChildType(XmlNodeType type) 221case XmlNodeType.Element: 222case XmlNodeType.Text: 223case XmlNodeType.EntityReference: 224case XmlNodeType.Comment: 225case XmlNodeType.Whitespace: 226case XmlNodeType.SignificantWhitespace: 227case XmlNodeType.ProcessingInstruction: 228case XmlNodeType.CDATA: 601linkedNode.NodeType == XmlNodeType.Text && //which is text node
System\Xml\Dom\XmlElementList.cs (3)
30Debug.Assert(parent.NodeType == XmlNodeType.Element || parent.NodeType == XmlNodeType.Document); 160if (curNode.NodeType == XmlNodeType.Element)
System\Xml\Dom\XmlEntity.cs (11)
90internal override bool IsValidChildType(XmlNodeType type) 92return (type == XmlNodeType.Text || 93type == XmlNodeType.Element || 94type == XmlNodeType.ProcessingInstruction || 95type == XmlNodeType.Comment || 96type == XmlNodeType.CDATA || 97type == XmlNodeType.Whitespace || 98type == XmlNodeType.SignificantWhitespace || 99type == XmlNodeType.EntityReference); 103public override XmlNodeType NodeType 105get { return XmlNodeType.Entity; }
System\Xml\Dom\XmlEntityReference.cs (11)
76public override XmlNodeType NodeType 78get { return XmlNodeType.EntityReference; } 132internal override bool IsValidChildType(XmlNodeType type) 136case XmlNodeType.Element: 137case XmlNodeType.Text: 138case XmlNodeType.EntityReference: 139case XmlNodeType.Comment: 140case XmlNodeType.Whitespace: 141case XmlNodeType.SignificantWhitespace: 142case XmlNodeType.ProcessingInstruction: 143case XmlNodeType.CDATA:
System\Xml\Dom\XmlLoader.cs (53)
88if (n.NodeType != XmlNodeType.Attribute) 108case XmlNodeType.Element: 143case XmlNodeType.EndElement: 148Debug.Assert(parent.NodeType == XmlNodeType.Element); 165case XmlNodeType.EntityReference: 169case XmlNodeType.EndEntity: 173case XmlNodeType.Attribute: 177case XmlNodeType.Text: 181case XmlNodeType.SignificantWhitespace: 185case XmlNodeType.Whitespace: 200case XmlNodeType.CDATA: 205case XmlNodeType.XmlDeclaration: 209case XmlNodeType.ProcessingInstruction: 213case XmlNodeType.Comment: 217case XmlNodeType.DocumentType: 251Debug.Assert(_reader!.NodeType == XmlNodeType.Attribute); 271case XmlNodeType.Text: 274case XmlNodeType.EntityReference: 328case XmlNodeType.Text: 331case XmlNodeType.EndEntity: 333case XmlNodeType.EntityReference: 358Debug.Assert(_reader!.NodeType == XmlNodeType.EntityReference); 363while (_reader.Read() && _reader.NodeType != XmlNodeType.EndEntity) 381Debug.Assert(_reader!.NodeType == XmlNodeType.XmlDeclaration); 419Debug.Assert(_reader!.NodeType == XmlNodeType.DocumentType); 465case XmlNodeType.Element: 493case XmlNodeType.EndElement: 494Debug.Assert(parent!.NodeType == XmlNodeType.Element); 503case XmlNodeType.EntityReference: 507case XmlNodeType.EndEntity: 510case XmlNodeType.Attribute: 514case XmlNodeType.SignificantWhitespace: 518case XmlNodeType.Whitespace: 529case XmlNodeType.Text: 533case XmlNodeType.CDATA: 537case XmlNodeType.ProcessingInstruction: 541case XmlNodeType.Comment: 597XmlTextReaderImpl tr = new XmlTextReaderImpl("", XmlNodeType.Element, pc); 746internal XmlNamespaceManager ParsePartialContent(XmlNode parentNode, string innerxmltext, XmlNodeType nt) 749Debug.Assert(parentNode.NodeType != XmlNodeType.Document); 760if (nt == XmlNodeType.Entity) 790XmlNamespaceManager mgr = ParsePartialContent(node, innerxmltext, XmlNodeType.Element); 798ParsePartialContent(node, innerxmltext, XmlNodeType.Attribute); 870ParsePartialContent(ent, EntitizeName(ent.Name), XmlNodeType.Entity); 909ParsePartialContent(eref, EntitizeName(eref.Name), XmlNodeType.EntityReference); 928private static XmlTextReaderImpl CreateInnerXmlReader(string xmlFragment, XmlNodeType nt, XmlParserContext context, XmlDocument doc) 930XmlNodeType contentNT = nt; 931if (contentNT == XmlNodeType.Entity || contentNT == XmlNodeType.EntityReference) 932contentNT = XmlNodeType.Element; 966if (nt == XmlNodeType.Entity || nt == XmlNodeType.EntityReference) 1000internal static Exception UnexpectedNodeType(XmlNodeType nodetype)
System\Xml\Dom\XmlNamedNodemap.cs (2)
145if (node.NodeType == XmlNodeType.Attribute) 212if (node.NodeType == XmlNodeType.Attribute)
System\Xml\Dom\XmlNode.cs (62)
118public abstract XmlNodeType NodeType 130if (parentNode.NodeType != XmlNodeType.Document) 188if (parentNode.NodeType == XmlNodeType.Document) 242while (parent != null && !(parent.NodeType == XmlNodeType.Document)) 276if (newChild.NodeType == XmlNodeType.DocumentFragment) 390if (newChild.NodeType == XmlNodeType.DocumentFragment) 596if (newChild.NodeType == XmlNodeType.DocumentFragment) 694internal virtual bool IsValidChildType(XmlNodeType type) 742case XmlNodeType.Text: 743case XmlNodeType.Whitespace: 744case XmlNodeType.SignificantWhitespace: 761case XmlNodeType.Element: 791Debug.Assert(firstNode.NodeType == XmlNodeType.Text 792|| firstNode.NodeType == XmlNodeType.SignificantWhitespace 793|| firstNode.NodeType == XmlNodeType.Whitespace 794|| secondNode.NodeType == XmlNodeType.Text 795|| secondNode.NodeType == XmlNodeType.SignificantWhitespace 796|| secondNode.NodeType == XmlNodeType.Whitespace); 797if (firstNode.NodeType == XmlNodeType.Text) 799if (secondNode.NodeType == XmlNodeType.Text) 801if (firstNode.NodeType == XmlNodeType.SignificantWhitespace) 803if (secondNode.NodeType == XmlNodeType.SignificantWhitespace) 805if (firstNode.NodeType == XmlNodeType.Whitespace) 807if (secondNode.NodeType == XmlNodeType.Whitespace) 861case XmlNodeType.EntityReference: 862case XmlNodeType.Entity: 865case XmlNodeType.Attribute: 906if (child.NodeType == XmlNodeType.Text || child.NodeType == XmlNodeType.CDATA 907|| child.NodeType == XmlNodeType.Whitespace || child.NodeType == XmlNodeType.SignificantWhitespace) 930XmlNodeType nodeType = fc.NodeType; 933case XmlNodeType.Text: 934case XmlNodeType.CDATA: 935case XmlNodeType.Whitespace: 936case XmlNodeType.SignificantWhitespace: 951&& firstChild.NodeType == XmlNodeType.Text)//which is a text node 1022XmlNodeType nt = curNode.NodeType; 1025if (nt == XmlNodeType.EntityReference) 1027if (nt == XmlNodeType.Document 1028|| nt == XmlNodeType.Entity 1029|| nt == XmlNodeType.Attribute) 1062if (NodeType == XmlNodeType.Document) 1091if (node.NodeType == XmlNodeType.Element) 1136else if (node.NodeType == XmlNodeType.Attribute) 1176if (node.NodeType == XmlNodeType.Element) 1215else if (node.NodeType == XmlNodeType.Attribute) 1244if (n.NodeType == XmlNodeType.Element && n.Name == name) 1260if (n.NodeType == XmlNodeType.Element && n.LocalName == localname && n.NamespaceURI == ns) 1300internal virtual XmlNode? FindChild(XmlNodeType type) 1461XmlNodeType nodeType = _node.NodeType; 1465case XmlNodeType.Element: 1466case XmlNodeType.EntityReference: 1469case XmlNodeType.Attribute: 1470case XmlNodeType.ProcessingInstruction: 1473case XmlNodeType.Text: 1474case XmlNodeType.CDATA: 1475case XmlNodeType.Comment: 1476case XmlNodeType.Whitespace: 1477case XmlNodeType.SignificantWhitespace: 1478case XmlNodeType.XmlDeclaration: 1481case XmlNodeType.DocumentType:
System\Xml\Dom\XmlNodeReader.cs (135)
75XmlNodeType nt = _curNode.NodeType; 76if (nt == XmlNodeType.Attribute) 89if (nt == XmlNodeType.Document) 103public XmlNodeType NodeType 107XmlNodeType nt = _curNode.NodeType; 110Debug.Assert(nt == XmlNodeType.XmlDeclaration || nt == XmlNodeType.DocumentType); 112return XmlNodeType.Text; 114return XmlNodeType.Attribute; 131Debug.Assert(_curNode.NodeType == XmlNodeType.XmlDeclaration || _curNode.NodeType == XmlNodeType.DocumentType); 137if (_curNode.NodeType == XmlNodeType.XmlDeclaration) 170private static bool IsLocalNameEmpty(XmlNodeType nt) 174case XmlNodeType.None: 175case XmlNodeType.Text: 176case XmlNodeType.CDATA: 177case XmlNodeType.Comment: 178case XmlNodeType.Document: 179case XmlNodeType.DocumentFragment: 180case XmlNodeType.Whitespace: 181case XmlNodeType.SignificantWhitespace: 182case XmlNodeType.EndElement: 183case XmlNodeType.EndEntity: 185case XmlNodeType.Element: 186case XmlNodeType.Attribute: 187case XmlNodeType.EntityReference: 188case XmlNodeType.Entity: 189case XmlNodeType.ProcessingInstruction: 190case XmlNodeType.DocumentType: 191case XmlNodeType.Notation: 192case XmlNodeType.XmlDeclaration: 214Debug.Assert(_curNode.NodeType == XmlNodeType.XmlDeclaration || _curNode.NodeType == XmlNodeType.DocumentType); 218if (_curNode.Value != null || _curNode.NodeType == XmlNodeType.DocumentType) 230XmlNodeType nt = _curNode.NodeType; 235Debug.Assert(nt == XmlNodeType.XmlDeclaration || nt == XmlNodeType.DocumentType); 237return _curNode.NodeType == XmlNodeType.XmlDeclaration ? 242if (nt == XmlNodeType.DocumentType) 246else if (nt == XmlNodeType.XmlDeclaration) 293if (_curNode.NodeType == XmlNodeType.Element) 305if (_curNode.NodeType == XmlNodeType.Attribute) 332XmlNodeType nt = _curNode.NodeType; 333if (nt == XmlNodeType.Element) 335else if (nt == XmlNodeType.Attribute 336|| (_bOnAttrVal && nt != XmlNodeType.XmlDeclaration && nt != XmlNodeType.DocumentType)) 338else if (nt == XmlNodeType.XmlDeclaration) 345else if (nt == XmlNodeType.DocumentType) 494XmlNodeType.Element => GetAttributeFromElement((XmlElement)_curNode!, name), 495XmlNodeType.Attribute => GetAttributeFromElement((XmlElement)_elemNode!, name), 496XmlNodeType.XmlDeclaration => GetDeclarationAttr((XmlDeclaration)_curNode, name), 497XmlNodeType.DocumentType => GetDocumentTypeAttr((XmlDocumentType)_curNode, name), 516XmlNodeType.Element => GetAttributeFromElement((XmlElement)_curNode, name, ns), 517XmlNodeType.Attribute => GetAttributeFromElement((XmlElement)_elemNode!, name, ns), 518XmlNodeType.XmlDeclaration => (ns.Length == 0) ? GetDeclarationAttr((XmlDeclaration)_curNode, name) : null, 519XmlNodeType.DocumentType => (ns.Length == 0) ? GetDocumentTypeAttr((XmlDocumentType)_curNode, name) : null, 530case XmlNodeType.Element: 533case XmlNodeType.Attribute: 536case XmlNodeType.XmlDeclaration: 541case XmlNodeType.DocumentType: 574XmlNodeType nt = _curNode.NodeType; 575return (nt == XmlNodeType.XmlDeclaration || nt == XmlNodeType.DocumentType); 593while (_curNode.NodeType != XmlNodeType.Attribute && ((_curNode = _curNode.ParentNode!) != null)) 601public void ResetMove(ref int level, ref XmlNodeType nt) 620if (_bOnAttrVal && _curNode.NodeType != XmlNodeType.Attribute) 622if (_curNode.NodeType == XmlNodeType.Attribute) 627nt = XmlNodeType.Element; 629if (_curNode.NodeType == XmlNodeType.Element) 662XmlNodeType nt = _curNode.NodeType; 663if (nt == XmlNodeType.Element) 665else if (nt == XmlNodeType.Attribute) 667else if (nt == XmlNodeType.XmlDeclaration && namespaceURI.Length == 0) 675else if (nt == XmlNodeType.DocumentType && namespaceURI.Length == 0) 693case XmlNodeType.Element: 703case XmlNodeType.Attribute: 712case XmlNodeType.XmlDeclaration: 713case XmlNodeType.DocumentType: 724XmlNodeType nt = _curNode.NodeType; 725if (nt == XmlNodeType.Attribute) 735else if (nt == XmlNodeType.Element) 746else if (nt == XmlNodeType.XmlDeclaration) 759else if (nt == XmlNodeType.DocumentType) 818if (_curNode.NodeType != XmlNodeType.Attribute) 830case XmlNodeType.Attribute: 838case XmlNodeType.XmlDeclaration: 839case XmlNodeType.DocumentType: 875if (node.NodeType == XmlNodeType.Element) 887else if (node.NodeType == XmlNodeType.Attribute) 943if (node.NodeType == XmlNodeType.Element) 973else if (node.NodeType == XmlNodeType.Attribute) 995if (node.NodeType == XmlNodeType.Element) 1026else if (node.NodeType == XmlNodeType.Attribute) 1049public bool ReadAttributeValue(ref int level, ref bool bResolveEntity, ref XmlNodeType nt) 1053Debug.Assert(_curNode.NodeType == XmlNodeType.XmlDeclaration || _curNode.NodeType == XmlNodeType.DocumentType); 1058nt = XmlNodeType.Text; 1063if (_curNode.NodeType == XmlNodeType.Attribute) 1078if (_curNode.NodeType == XmlNodeType.EntityReference && bResolveEntity) 1094if (parentNode != null && parentNode.NodeType == XmlNodeType.EntityReference) 1098nt = XmlNodeType.EndEntity; 1130private XmlNodeType _nodeType; // nodeType of the node that the reader is currently positioned on 1152_nodeType = XmlNodeType.None; 1168public override XmlNodeType NodeType 1170get { return (IsInReadingStates()) ? _nodeType : XmlNodeType.None; } 1329if (!IsInReadingStates() || _nodeType == XmlNodeType.EndElement) 1457if (!IsInReadingStates() || _nodeType == XmlNodeType.EndElement) 1513if ((_readerNav.NodeType == XmlNodeType.Document) || (_readerNav.NodeType == XmlNodeType.DocumentFragment)) 1547_nodeType = XmlNodeType.None; 1556_nodeType = XmlNodeType.None; 1561XmlNodeType nt = _readerNav.NodeType; 1565&& (_nodeType != XmlNodeType.EndElement) 1566&& (_nodeType != XmlNodeType.EndEntity) 1567&& (nt == XmlNodeType.Element || (nt == XmlNodeType.EntityReference && _bResolveEntity) || 1568(((_readerNav.NodeType == XmlNodeType.Document) || (_readerNav.NodeType == XmlNodeType.DocumentFragment)) && _readState == ReadState.Initial)); 1580else if (_readerNav.NodeType == XmlNodeType.Element 1583_nodeType = XmlNodeType.EndElement; 1586else if (_readerNav.NodeType == XmlNodeType.EntityReference && _bResolveEntity) 1589_nodeType = XmlNodeType.EndEntity; 1597if (_readerNav.NodeType == XmlNodeType.EntityReference && _bResolveEntity) 1609_nodeType = XmlNodeType.EndEntity; 1622_nodeType = XmlNodeType.None; 1629&& _nodeType != XmlNodeType.EndElement 1630&& _readerNav.NodeType == XmlNodeType.Element 1633_nodeType = XmlNodeType.EndElement; 1667if (_readerNav.NodeType == XmlNodeType.Element) 1670_nodeType = XmlNodeType.EndElement; 1673else if (_readerNav.NodeType == XmlNodeType.EntityReference) 1677_nodeType = XmlNodeType.EndEntity; 1724if ((this.NodeType == XmlNodeType.EntityReference) && _bResolveEntity) 1774if (!IsInReadingStates() || (_nodeType != XmlNodeType.EntityReference))
System\Xml\Dom\XmlNotation.cs (2)
36public override XmlNodeType NodeType 38get { return XmlNodeType.Notation; }
System\Xml\Dom\XmlProcessingInstruction.cs (2)
77public override XmlNodeType NodeType => XmlNodeType.ProcessingInstruction;
System\Xml\Dom\XmlSignificantWhiteSpace.cs (7)
37public override XmlNodeType NodeType 41return XmlNodeType.SignificantWhitespace; 51case XmlNodeType.Document: 53case XmlNodeType.Text: 54case XmlNodeType.CDATA: 55case XmlNodeType.Whitespace: 56case XmlNodeType.SignificantWhitespace:
System\Xml\Dom\XmlText.cs (8)
40public override XmlNodeType NodeType 44return XmlNodeType.Text; 54case XmlNodeType.Document: 56case XmlNodeType.Text: 57case XmlNodeType.CDATA: 58case XmlNodeType.Whitespace: 59case XmlNodeType.SignificantWhitespace: 91if (parent != null && parent.NodeType == XmlNodeType.Attribute)
System\Xml\Dom\XmlWhitespace.cs (7)
38public override XmlNodeType NodeType 42return XmlNodeType.Whitespace; 52case XmlNodeType.Document: 54case XmlNodeType.Text: 55case XmlNodeType.CDATA: 56case XmlNodeType.Whitespace: 57case XmlNodeType.SignificantWhitespace:
System\Xml\Schema\AutoValidator.cs (1)
67if (reader.NodeType == XmlNodeType.Element)
System\Xml\Schema\DtdValidator.cs (12)
62case XmlNodeType.Element: 66goto case XmlNodeType.EndElement; 69case XmlNodeType.Whitespace: 70case XmlNodeType.SignificantWhitespace: 76case XmlNodeType.ProcessingInstruction: 77case XmlNodeType.Comment: 81case XmlNodeType.Text: // text inside a node 82case XmlNodeType.CDATA: // <![CDATA[...]]> 85case XmlNodeType.EntityReference: 91case XmlNodeType.EndElement: 99reader.NodeType == XmlNodeType.Element) 149Debug.Assert(reader.NodeType == XmlNodeType.Element);
System\Xml\Schema\Inference\Infer.cs (32)
186while (_xtr.NodeType != XmlNodeType.Element && _xtr.Read()) ; 189if (_xtr.NodeType == XmlNodeType.Element) 693if (_xtr.NodeType == XmlNodeType.Whitespace) 697if (_xtr.NodeType == XmlNodeType.EntityReference) 701} while ((!_xtr.EOF) && (_xtr.NodeType != XmlNodeType.EndElement) && (_xtr.NodeType != XmlNodeType.CDATA) && (_xtr.NodeType != XmlNodeType.Element) && (_xtr.NodeType != XmlNodeType.Text)); 703if (_xtr.NodeType == XmlNodeType.EndElement) 768while (!_xtr.EOF && (_xtr.NodeType != XmlNodeType.EndElement)) 772if ((_xtr.NodeType == XmlNodeType.Text) || (_xtr.NodeType == XmlNodeType.CDATA)) //node can be simple type, complex with simple content or complex with mixed content 782do { _xtr.Read(); } while ((!_xtr.EOF) && ((_xtr.NodeType == XmlNodeType.CDATA) || (_xtr.NodeType == XmlNodeType.Text) || (_xtr.NodeType == XmlNodeType.Comment) || (_xtr.NodeType == XmlNodeType.ProcessingInstruction) || (_xtr.NodeType == XmlNodeType.Whitespace) || (_xtr.NodeType == XmlNodeType.SignificantWhitespace) || (_xtr.NodeType == XmlNodeType.XmlDeclaration))); 784if (_xtr.NodeType == XmlNodeType.EndElement) 791if ((_xtr.NodeType == XmlNodeType.Text) && (iChildNumber == 1)) 822if (_xtr.NodeType == XmlNodeType.Text) 853if (_xtr.NodeType == XmlNodeType.Text) 863else if (_xtr.NodeType == XmlNodeType.Text) 889else if (_xtr.NodeType == XmlNodeType.Element) 944else if (_xtr.NodeType == XmlNodeType.Text) 952if (_xtr.NodeType == XmlNodeType.EntityReference) 964} while ((!_xtr.EOF) && (_xtr.NodeType != XmlNodeType.EndElement) && (_xtr.NodeType != XmlNodeType.CDATA) && (_xtr.NodeType != XmlNodeType.Element) && (_xtr.NodeType != XmlNodeType.Text)); 1202Debug.Assert(_xtr!.NodeType == XmlNodeType.Attribute);
System\Xml\Schema\Parser.cs (25)
70while (reader.NodeType != XmlNodeType.Element && reader.Read()) { } 176else if (_reader.NodeType == XmlNodeType.Element) 222else if (_reader.NodeType == XmlNodeType.Text) 229else if (_reader.NodeType == XmlNodeType.EntityReference || 230_reader.NodeType == XmlNodeType.SignificantWhitespace || 231_reader.NodeType == XmlNodeType.CDATA) 235else if (_reader.NodeType == XmlNodeType.EndElement) 276case XmlNodeType.Element: 288case XmlNodeType.Text: 292case XmlNodeType.SignificantWhitespace: 296case XmlNodeType.CDATA: 300case XmlNodeType.EntityReference: 304case XmlNodeType.Comment: 308case XmlNodeType.ProcessingInstruction: 312case XmlNodeType.EndEntity: 315case XmlNodeType.Whitespace: 318case XmlNodeType.EndElement: 333Debug.Assert(_reader!.NodeType == XmlNodeType.Element); 418Debug.Assert(_reader!.NodeType == XmlNodeType.Attribute); 428case XmlNodeType.Text: 431case XmlNodeType.EntityReference: 444Debug.Assert(_reader!.NodeType == XmlNodeType.EntityReference); 457case XmlNodeType.Text: 460case XmlNodeType.EndEntity: 466case XmlNodeType.EntityReference:
System\Xml\Schema\ParserAsync.cs (1)
30while (reader.NodeType != XmlNodeType.Element && await reader.ReadAsync().ConfigureAwait(false)) { }
System\Xml\Schema\XdrValidator.cs (7)
69case XmlNodeType.Element: 73goto case XmlNodeType.EndElement; 76case XmlNodeType.Whitespace: 79case XmlNodeType.Text: // text inside a node 80case XmlNodeType.CDATA: // <![CDATA[...]]> 81case XmlNodeType.SignificantWhitespace: 84case XmlNodeType.EndElement:
System\Xml\Schema\XmlSchemaValidator.cs (1)
1054attrData.NodeType = XmlNodeType.Attribute;
System\Xml\Schema\XsdValidator.cs (7)
106case XmlNodeType.Element: 110goto case XmlNodeType.EndElement; 113case XmlNodeType.Whitespace: 116case XmlNodeType.Text: // text inside a node 117case XmlNodeType.CDATA: // <![CDATA[...]]> 118case XmlNodeType.SignificantWhitespace: 121case XmlNodeType.EndElement:
System\Xml\Serialization\_Events.cs (1)
139public XmlNodeType NodeType
System\Xml\Serialization\PrimitiveXmlSerializers.cs (20)
252if (Reader.NodeType == System.Xml.XmlNodeType.Element) 281if (Reader.NodeType == System.Xml.XmlNodeType.Element) 305if (Reader.NodeType == System.Xml.XmlNodeType.Element) 329if (Reader.NodeType == System.Xml.XmlNodeType.Element) 353if (Reader.NodeType == System.Xml.XmlNodeType.Element) 377if (Reader.NodeType == System.Xml.XmlNodeType.Element) 401if (Reader.NodeType == System.Xml.XmlNodeType.Element) 425if (Reader.NodeType == System.Xml.XmlNodeType.Element) 449if (Reader.NodeType == System.Xml.XmlNodeType.Element) 473if (Reader.NodeType == System.Xml.XmlNodeType.Element) 503if (Reader.NodeType == System.Xml.XmlNodeType.Element) 527if (Reader.NodeType == System.Xml.XmlNodeType.Element) 551if (Reader.NodeType == System.Xml.XmlNodeType.Element) 575if (Reader.NodeType == System.Xml.XmlNodeType.Element) 599if (Reader.NodeType == System.Xml.XmlNodeType.Element) 623if (Reader.NodeType == System.Xml.XmlNodeType.Element) 652if (Reader.NodeType == System.Xml.XmlNodeType.Element) 676if (Reader.NodeType == System.Xml.XmlNodeType.Element) 706if (Reader.NodeType == System.Xml.XmlNodeType.Element) 730if (Reader.NodeType == System.Xml.XmlNodeType.Element)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (18)
105while (Reader.NodeType != XmlNodeType.EndElement && Reader.NodeType != XmlNodeType.None) 266while (Reader.NodeType != XmlNodeType.EndElement && Reader.NodeType != XmlNodeType.None) 325while (Reader.NodeType == XmlNodeType.Element) 386while (Reader.NodeType != XmlNodeType.EndElement && Reader.NodeType != XmlNodeType.None) 480if (Reader.NodeType == XmlNodeType.Element) 533while (Reader.NodeType != XmlNodeType.EndElement && Reader.NodeType != XmlNodeType.None) 678if ((Reader.NodeType == XmlNodeType.Text || 679Reader.NodeType == XmlNodeType.CDATA || 680Reader.NodeType == XmlNodeType.Whitespace || 681Reader.NodeType == XmlNodeType.SignificantWhitespace)) 1151while (Reader.NodeType != XmlNodeType.EndElement && Reader.NodeType != XmlNodeType.None) 1380while (Reader.NodeType != XmlNodeType.EndElement && Reader.NodeType != XmlNodeType.None)
System\Xml\Serialization\XmlSerializationReader.cs (37)
821while (_r.NodeType != XmlNodeType.EndElement) 898if (_r.NodeType != XmlNodeType.EndElement) 900while (_r.NodeType != XmlNodeType.EndElement) 1204if (_r.NodeType == XmlNodeType.None || _r.NodeType == XmlNodeType.Whitespace) 1209if (_r.NodeType == XmlNodeType.EndElement) 1215else if (_r.NodeType == XmlNodeType.Attribute && _events.OnUnknownAttribute == null) 1219else if (_r.NodeType == XmlNodeType.Element && _events.OnUnknownElement == null) 1234if (unknownNode.NodeType != XmlNodeType.None && unknownNode.NodeType != XmlNodeType.Whitespace && _events.OnUnknownNode != null) 1241if (unknownNode.NodeType == XmlNodeType.Attribute) 1245else if (unknownNode.NodeType == XmlNodeType.Element) 1274XmlNodeType.Element => $"<{_r.LocalName} xmlns='{_r.NamespaceURI}'>", 1275XmlNodeType.EndElement => ">", 1276XmlNodeType.Text => _r.Value, 1277XmlNodeType.CDATA => "CDATA", 1278XmlNodeType.Comment => "<--", 1279XmlNodeType.ProcessingInstruction => "<?", 1406while (_r.NodeType == XmlNodeType.Whitespace) _r.Skip(); 1407if (_r.NodeType == XmlNodeType.None) _r.Skip(); 1408if (_r.NodeType == XmlNodeType.EndElement && _r.LocalName == name && _r.NamespaceURI == ns) 1670while (_r.NodeType != XmlNodeType.EndElement) 1686while (_r.NodeType != XmlNodeType.EndElement) 1762while (_r.NodeType != XmlNodeType.EndElement && _r.NodeType != XmlNodeType.None) 1867while (_r.NodeType == XmlNodeType.Whitespace) _r.Skip(); 1868if (_r.NodeType == XmlNodeType.None) _r.Skip(); 1882if (Reader.NodeType == XmlNodeType.Attribute) 1943while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) 4016Writer.Write(typeof(XmlNodeType).FullName); 4046Writer.Write(typeof(XmlNodeType).FullName); 4049Writer.Write(typeof(XmlNodeType).FullName); 4052Writer.Write(typeof(XmlNodeType).FullName); 4055Writer.Write(typeof(XmlNodeType).FullName); 4954Writer.Write(typeof(XmlNodeType).FullName); 4956Writer.Write(typeof(XmlNodeType).FullName); 4980Writer.Write(typeof(XmlNodeType).FullName);
System\Xml\Serialization\XmlSerializationReaderILGen.cs (4)
2280ilg.Ldc(XmlNodeType.Text); 2286ilg.Ldc(XmlNodeType.CDATA); 2292ilg.Ldc(XmlNodeType.Whitespace); 2298ilg.Ldc(XmlNodeType.SignificantWhitespace);
System\Xml\XPath\XPathDocument.cs (14)
194case XmlNodeType.Element: 232case XmlNodeType.EndElement: 236case XmlNodeType.Text: 237case XmlNodeType.CDATA: 241case XmlNodeType.SignificantWhitespace: 246goto case XmlNodeType.Whitespace; 249case XmlNodeType.Whitespace: 261case XmlNodeType.Comment: 265case XmlNodeType.ProcessingInstruction: 269case XmlNodeType.EntityReference: 273case XmlNodeType.DocumentType: 280case XmlNodeType.EndEntity: 281case XmlNodeType.None: 282case XmlNodeType.XmlDeclaration:
System\Xml\XPath\XPathNavigator.cs (15)
2016XmlTextReader reader = new XmlTextReader(xml, XmlNodeType.Element, context); 2044case XmlNodeType.Element: 2083case XmlNodeType.EndElement: 2088case XmlNodeType.Text: 2089case XmlNodeType.CDATA: 2092case XmlNodeType.SignificantWhitespace: 2093case XmlNodeType.Whitespace: 2096case XmlNodeType.Comment: 2099case XmlNodeType.ProcessingInstruction: 2102case XmlNodeType.EntityReference: 2105case XmlNodeType.EndEntity: 2106case XmlNodeType.None: 2107case XmlNodeType.DocumentType: 2108case XmlNodeType.XmlDeclaration: 2110case XmlNodeType.Attribute:
System\Xml\XPath\XPathNavigatorReader.cs (36)
34private XmlNodeType _nodeType; 46private static ReadOnlySpan<XmlNodeType> ConvertFromXPathNodeType => 48XmlNodeType.Document, // XPathNodeType.Root 49XmlNodeType.Element, // XPathNodeType.Element 50XmlNodeType.Attribute, // XPathNodeType.Attribute 51XmlNodeType.Attribute, // XPathNodeType.Namespace 52XmlNodeType.Text, // XPathNodeType.Text 53XmlNodeType.SignificantWhitespace, // XPathNodeType.SignificantWhitespace 54XmlNodeType.Whitespace, // XPathNodeType.Whitespace 55XmlNodeType.ProcessingInstruction, // XPathNodeType.ProcessingInstruction 56XmlNodeType.Comment, // XPathNodeType.Comment 57XmlNodeType.None // XPathNodeType.All 64internal static XmlNodeType ToXmlNodeType(XPathNodeType typ) 182if (_nodeType == XmlNodeType.Text) 193public override XmlNodeType NodeType 206if (this.NodeType == XmlNodeType.Text) 220if (this.NodeType == XmlNodeType.Text) 234if (this.NodeType == XmlNodeType.Text) 297if ((_nodeType != XmlNodeType.Element) 298&& (_nodeType != XmlNodeType.Document) 299&& (_nodeType != XmlNodeType.EndElement) 300&& (_nodeType != XmlNodeType.None)) 310if ((_nodeType != XmlNodeType.Element) 311&& (_nodeType != XmlNodeType.Document) 312&& (_nodeType != XmlNodeType.EndElement) 313&& (_nodeType != XmlNodeType.None)) 347if (_nodeType == XmlNodeType.Element) 377_nodeType = XmlNodeType.Attribute; 686_nodeType = XmlNodeType.Attribute; 771_nodeType = XmlNodeType.Element; 833_nodeType = XmlNodeType.Text; 1005else if (_nodeType == XmlNodeType.Element 1008_nodeType = XmlNodeType.EndElement; 1029_nodeType = XmlNodeType.EndElement; 1067_nodeType = XmlNodeType.None; 1078_nodeType = XmlNodeType.None;
System\Xml\Xsl\Runtime\WhitespaceRuleReader.cs (8)
83case XmlNodeType.Element: 94case XmlNodeType.EndElement: 99case XmlNodeType.Text: 100case XmlNodeType.CDATA: 109goto case XmlNodeType.Whitespace; 121case XmlNodeType.Whitespace: 122case XmlNodeType.SignificantWhitespace: 138case XmlNodeType.EndEntity:
System\Xml\Xsl\Xslt\XsltInput.cs (73)
32private XmlNodeType _nodeType; 55_nodeType = XmlNodeType.Document; 59public XmlNodeType NodeType { get { return _nodeType == XmlNodeType.Element && 0 < _currentRecord ? XmlNodeType.Attribute : _nodeType; } } 122while (MoveToNextSibling() && _nodeType == XmlNodeType.Whitespace) ; 125if (_nodeType == XmlNodeType.Element) 202_reader.NodeType == XmlNodeType.Whitespace || _reader.NodeType == XmlNodeType.SignificantWhitespace || 203_reader.NodeType == XmlNodeType.Text || _reader.NodeType == XmlNodeType.CDATA 213bool isCDATA = (_reader.NodeType == XmlNodeType.CDATA); 244Debug.Assert(_reader.NodeType == XmlNodeType.EntityReference); 258Debug.Assert(_reader.NodeType == XmlNodeType.Text || _reader.NodeType == XmlNodeType.Whitespace || _reader.NodeType == XmlNodeType.SignificantWhitespace); 261Debug.Assert(_reader.NodeType == XmlNodeType.EndEntity); 273Debug.Assert(_reader.NodeType == XmlNodeType.Attribute, "reader.NodeType == XmlNodeType.Attribute"); 303int correction = (_reader.NodeType == XmlNodeType.EntityReference) ? -2 : -1; 317case XmlNodeType.EntityReference: 320case XmlNodeType.EndEntity: 323Debug.Assert(_reader.NodeType == XmlNodeType.Text, "Unexpected node type inside attribute value"); 332Debug.Assert(_reader.NodeType != XmlNodeType.EntityReference); 333int correction = ((_reader.NodeType == XmlNodeType.EndEntity) ? 1 : lastText.Length) + 1; 348Debug.Assert(_nodeType == XmlNodeType.Element, "To call MoveToFirstChild() XsltInut should be positioned on an Element."); 358Debug.Assert(_nodeType != XmlNodeType.Element || IsEmptyElement, "On non-empty elements we should call MoveToFirstChild()"); 359if (_nodeType == XmlNodeType.Element || _nodeType == XmlNodeType.EndElement) 368if (_nodeType == XmlNodeType.Element && MoveToFirstChild()) 386case XmlNodeType.Text: 388case XmlNodeType.CDATA: 393goto case XmlNodeType.SignificantWhitespace; 394case XmlNodeType.Whitespace: 395case XmlNodeType.SignificantWhitespace: 401case XmlNodeType.EntityReference: 423case XmlNodeType.EndEntity: 428!textIsWhite ? XmlNodeType.Text : 429textPreserveWS ? XmlNodeType.SignificantWhitespace : 430/*default: */ XmlNodeType.Whitespace 441Debug.Assert(_nodeType == XmlNodeType.Text || _nodeType == XmlNodeType.Whitespace || _nodeType == XmlNodeType.SignificantWhitespace); 454case XmlNodeType.Text: 455case XmlNodeType.CDATA: 456case XmlNodeType.Whitespace: 457case XmlNodeType.SignificantWhitespace: 458case XmlNodeType.EntityReference: 467case XmlNodeType.Element: 471case XmlNodeType.EndElement: 472_nodeType = XmlNodeType.EndElement; 488Debug.Assert(_reader.NodeType == XmlNodeType.Element); 492_nodeType = XmlNodeType.Element; 518Debug.Assert(_nodeType == XmlNodeType.Element, "For MoveToElement() we should be positioned on Element or Attribute"); 524Debug.Assert(_nodeType == XmlNodeType.Element, "For MoveToLiteralAttribute() we should be positioned on Element or Attribute"); 539Debug.Assert(_nodeType == XmlNodeType.Element, "For MoveToLiteralAttribute() we should be positioned on Element or Attribute"); 589Debug.Assert(_nodeType == XmlNodeType.Element || _nodeType == XmlNodeType.EndElement, "Input is positioned on element or attribute"); 620Debug.Assert(_nodeType != XmlNodeType.Element || _attributesRead, "Should first read attributes"); 628Debug.Assert(_nodeType != XmlNodeType.Element || _attributesRead, "Should first read attributes"); 637Debug.Assert(_nodeType != XmlNodeType.Element || _attributesRead, "Should first read attributes"); 714Debug.Assert(NodeType == XmlNodeType.Element); 843Debug.Assert(NodeType == XmlNodeType.Element); 921Debug.Assert(NodeType == XmlNodeType.Element && IsXsltNamespace()); 1039private static int PositionAdjustment(XmlNodeType nt) => 1042XmlNodeType.Element => 1, // "<" 1043XmlNodeType.CDATA => 9, // "<![CDATA[" 1044XmlNodeType.ProcessingInstruction => 2, // "<?" 1045XmlNodeType.Comment => 4, // "<!--" 1046XmlNodeType.EndElement => 2, // "</" 1047XmlNodeType.EntityReference => 1, // "&" 1179Debug.Assert(input.NodeType == XmlNodeType.EndElement); 1184Debug.Assert(input.NodeType == XmlNodeType.Element || input.NodeType == XmlNodeType.Attribute);
System\Xml\Xsl\Xslt\XsltLoader.cs (28)
298Debug.Assert(_input.NodeType == XmlNodeType.Element); 370case XmlNodeType.Element: 464case XmlNodeType.Whitespace: 465case XmlNodeType.SignificantWhitespace: 468Debug.Assert(_input.NodeType == XmlNodeType.Text); 1096case XmlNodeType.Element: 1108case XmlNodeType.Whitespace: 1109case XmlNodeType.SignificantWhitespace: 1112Debug.Assert(_input.NodeType == XmlNodeType.Text); 1380case XmlNodeType.Element: 1449case XmlNodeType.SignificantWhitespace: 1452case XmlNodeType.Whitespace: 1455Debug.Assert(_input.NodeType == XmlNodeType.Text); 1457goto case XmlNodeType.SignificantWhitespace; 1478case XmlNodeType.Element: 1499case XmlNodeType.Whitespace: 1500case XmlNodeType.SignificantWhitespace: 1503Debug.Assert(_input.NodeType == XmlNodeType.Text); 1671case XmlNodeType.Element: 1712case XmlNodeType.Whitespace: 1713case XmlNodeType.SignificantWhitespace: 1716Debug.Assert(_input.NodeType == XmlNodeType.Text); 2027case XmlNodeType.Text: 2028case XmlNodeType.Whitespace: 2029case XmlNodeType.SignificantWhitespace: 2034Debug.Assert(_input.NodeType == XmlNodeType.Element); 2480Debug.Assert(_input.NodeType == XmlNodeType.Element); 3061if (_input.NodeType != XmlNodeType.Whitespace)
System\Xml\Xsl\XsltOld\BuilderInfo.cs (3)
21private XmlNodeType _nodeType; 85Debug.Assert(info.NodeType != XmlNodeType.Text || XmlCharType.IsOnlyWhitespace(info.Value)); 184internal XmlNodeType NodeType
System\Xml\Xsl\XsltOld\NavigatorOutput.cs (8)
34case XmlNodeType.Element: 62case XmlNodeType.Text: 65case XmlNodeType.Whitespace: 67case XmlNodeType.SignificantWhitespace: 71case XmlNodeType.ProcessingInstruction: 74case XmlNodeType.Comment: 78case XmlNodeType.Document: 81case XmlNodeType.EndElement:
System\Xml\Xsl\XsltOld\ReaderOutput.cs (21)
53public override XmlNodeType NodeType 296if (NodeType == XmlNodeType.Attribute || _currentInfo == _attributeValue) 338case XmlNodeType.Text: 341_currentInfo.NodeType = XmlNodeType.Whitespace; 342goto case XmlNodeType.Whitespace; 346case XmlNodeType.Whitespace: 353_currentInfo.NodeType = XmlNodeType.SignificantWhitespace; 391if (NodeType == XmlNodeType.Element || NodeType == XmlNodeType.Attribute || _currentInfo == _attributeValue) 410case XmlNodeType.Text: 411case XmlNodeType.Whitespace: 412case XmlNodeType.SignificantWhitespace: 437if (NodeType == XmlNodeType.Element && !IsEmptyElement) 450Debug.Assert(NodeType == XmlNodeType.EndElement); 456else if (NodeType == XmlNodeType.Attribute) 472if (NodeType == XmlNodeType.Element) 498else if (NodeType == XmlNodeType.Attribute) 536Debug.Assert(NodeType != XmlNodeType.EntityReference); 538if (NodeType != XmlNodeType.EntityReference) 546if (ReadState != ReadState.Interactive || NodeType != XmlNodeType.Attribute) 554_attributeValue.NodeType = XmlNodeType.Text;
System\Xml\Xsl\XsltOld\RecordBuilder.cs (17)
195_currentInfo.NodeType = XmlNodeType.Text; 286_currentInfo!.NodeType = XmlNodeType.Element; 301_currentInfo!.NodeType = XmlNodeType.EndElement; 332attribute.NodeType = XmlNodeType.Attribute; 377_currentInfo.NodeType = XmlNodeType.Attribute; 382_currentInfo!.NodeType = XmlNodeType.ProcessingInstruction; 392_currentInfo!.NodeType = XmlNodeType.Comment; 422_currentInfo.NodeType = XmlNodeType.None; 487Debug.Assert(_mainNode.NodeType == XmlNodeType.Element); 512Debug.Assert(_mainNode.NodeType == XmlNodeType.Element); 614Debug.Assert(_mainNode.NodeType == XmlNodeType.Comment); 667Debug.Assert(_mainNode.NodeType == XmlNodeType.ProcessingInstruction || _mainNode.NodeType == XmlNodeType.XmlDeclaration); 718case XmlNodeType.Element: 727case XmlNodeType.Comment: 730case XmlNodeType.ProcessingInstruction: 762ns.NodeType = XmlNodeType.Attribute;
System\Xml\Xsl\XsltOld\SequentialOutput.cs (27)
109Debug.Assert(record.MainNode.NodeType == XmlNodeType.Element); 366case XmlNodeType.Element: 372case XmlNodeType.Text: 373case XmlNodeType.Whitespace: 374case XmlNodeType.SignificantWhitespace: 427case XmlNodeType.Element: 430case XmlNodeType.Text: 431case XmlNodeType.Whitespace: 432case XmlNodeType.SignificantWhitespace: 435case XmlNodeType.CDATA: 438case XmlNodeType.EntityReference: 443case XmlNodeType.ProcessingInstruction: 446case XmlNodeType.Comment: 452case XmlNodeType.Document: 454case XmlNodeType.DocumentType: 457case XmlNodeType.EndElement: 476case XmlNodeType.Element: 479case XmlNodeType.Text: 480case XmlNodeType.Whitespace: 481case XmlNodeType.SignificantWhitespace: 484case XmlNodeType.CDATA: 487case XmlNodeType.EntityReference: 492case XmlNodeType.ProcessingInstruction: 495case XmlNodeType.Comment: 500case XmlNodeType.Document: 502case XmlNodeType.DocumentType: 505case XmlNodeType.EndElement:
System\Xml\Xsl\XsltOld\TextOnlyOutput.cs (3)
53case XmlNodeType.Text: 54case XmlNodeType.Whitespace: 55case XmlNodeType.SignificantWhitespace:
System\Xml\Xsl\XsltOld\WriterOutput.cs (17)
30case XmlNodeType.Element: 40case XmlNodeType.Text: 41case XmlNodeType.Whitespace: 42case XmlNodeType.SignificantWhitespace: 45case XmlNodeType.CDATA: 49case XmlNodeType.EntityReference: 52case XmlNodeType.ProcessingInstruction: 55case XmlNodeType.Comment: 58case XmlNodeType.Document: 60case XmlNodeType.DocumentType: 63case XmlNodeType.EndElement: 67case XmlNodeType.None: 68case XmlNodeType.Attribute: 69case XmlNodeType.Entity: 70case XmlNodeType.Notation: 71case XmlNodeType.DocumentFragment: 72case XmlNodeType.EndEntity:
System.Private.Xml.Linq (160)
System\Xml\Linq\XAttribute.cs (2)
123public override XmlNodeType NodeType 127return XmlNodeType.Attribute;
System\Xml\Linq\XCData.cs (2)
34public override XmlNodeType NodeType 38return XmlNodeType.CDATA;
System\Xml\Linq\XComment.cs (2)
59public override XmlNodeType NodeType 63return XmlNodeType.Comment;
System\Xml\Linq\XContainer.cs (46)
668if (n.NodeType != XmlNodeType.Text) return null; 678while (n != null && n.NodeType == XmlNodeType.Text) 905case XmlNodeType.Element: 921case XmlNodeType.EndElement: 926case XmlNodeType.Text: 927case XmlNodeType.SignificantWhitespace: 928case XmlNodeType.Whitespace: 931case XmlNodeType.CDATA: 934case XmlNodeType.Comment: 937case XmlNodeType.ProcessingInstruction: 940case XmlNodeType.DocumentType: 943case XmlNodeType.EntityReference: 947case XmlNodeType.EndEntity: 959case XmlNodeType.Element: 977case XmlNodeType.EndElement: 982case XmlNodeType.Text: 983case XmlNodeType.SignificantWhitespace: 984case XmlNodeType.Whitespace: 987case XmlNodeType.CDATA: 990case XmlNodeType.Comment: 993case XmlNodeType.ProcessingInstruction: 996case XmlNodeType.DocumentType: 999case XmlNodeType.EntityReference: 1003case XmlNodeType.EndEntity: 1018case XmlNodeType.Element: 1053case XmlNodeType.EndElement: 1072case XmlNodeType.Text: 1073case XmlNodeType.SignificantWhitespace: 1074case XmlNodeType.Whitespace: 1085case XmlNodeType.CDATA: 1088case XmlNodeType.Comment: 1091case XmlNodeType.ProcessingInstruction: 1094case XmlNodeType.DocumentType: 1097case XmlNodeType.EntityReference: 1101case XmlNodeType.EndEntity: 1132case XmlNodeType.Element: 1169case XmlNodeType.EndElement: 1188case XmlNodeType.Text: 1189case XmlNodeType.SignificantWhitespace: 1190case XmlNodeType.Whitespace: 1201case XmlNodeType.CDATA: 1204case XmlNodeType.Comment: 1207case XmlNodeType.ProcessingInstruction: 1210case XmlNodeType.DocumentType: 1213case XmlNodeType.EntityReference: 1217case XmlNodeType.EndEntity:
System\Xml\Linq\XDocument.cs (20)
138public override XmlNodeType NodeType 142return XmlNodeType.Document; 499if (reader.NodeType == XmlNodeType.XmlDeclaration) 900case XmlNodeType.Text: 903case XmlNodeType.Element: 904ValidateDocument(previous, XmlNodeType.DocumentType, XmlNodeType.None); 906case XmlNodeType.DocumentType: 907ValidateDocument(previous, XmlNodeType.None, XmlNodeType.Element); 909case XmlNodeType.CDATA: 910throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.CDATA)); 911case XmlNodeType.Document: 912throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.Document)); 916private void ValidateDocument(XNode? previous, XmlNodeType allowBefore, XmlNodeType allowAfter) 925XmlNodeType nt = n.NodeType; 926if (nt == XmlNodeType.Element || nt == XmlNodeType.DocumentType) 929allowBefore = XmlNodeType.None;
System\Xml\Linq\XDocumentType.cs (2)
96public override XmlNodeType NodeType 100return XmlNodeType.DocumentType;
System\Xml\Linq\XElement.cs (10)
288public override XmlNodeType NodeType 292return XmlNodeType.Element; 811if (reader.MoveToContent() != XmlNodeType.Element) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType)); 846if (await reader.MoveToContentAsync().ConfigureAwait(false) != XmlNodeType.Element) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType)); 1883if (reader.MoveToContent() != XmlNodeType.Element) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType)); 2125if (node is XDocument) throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.Document)); 2126if (node is XDocumentType) throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.DocumentType));
System\Xml\Linq\XNode.cs (16)
433case XmlNodeType.Text: 434case XmlNodeType.SignificantWhitespace: 435case XmlNodeType.Whitespace: 437case XmlNodeType.CDATA: 439case XmlNodeType.Comment: 441case XmlNodeType.DocumentType: 443case XmlNodeType.Element: 445case XmlNodeType.ProcessingInstruction: 481case XmlNodeType.Text: 482case XmlNodeType.SignificantWhitespace: 483case XmlNodeType.Whitespace: 486case XmlNodeType.CDATA: 489case XmlNodeType.Comment: 492case XmlNodeType.DocumentType: 500case XmlNodeType.Element: 502case XmlNodeType.ProcessingInstruction:
System\Xml\Linq\XNodeReader.cs (21)
165case XmlNodeType.Attribute: 166case XmlNodeType.Text: 167case XmlNodeType.CDATA: 168case XmlNodeType.Comment: 169case XmlNodeType.ProcessingInstruction: 170case XmlNodeType.DocumentType: 274public override XmlNodeType NodeType 280return XmlNodeType.None; 287return XmlNodeType.EndElement; 289XmlNodeType nt = o.NodeType; 290if (nt != XmlNodeType.Text) 296return XmlNodeType.Whitespace; 298return XmlNodeType.Text; 302return XmlNodeType.Whitespace; 304return XmlNodeType.Text; 369case XmlNodeType.Attribute: 371case XmlNodeType.Text: 372case XmlNodeType.CDATA: 374case XmlNodeType.Comment: 376case XmlNodeType.ProcessingInstruction: 378case XmlNodeType.DocumentType:
System\Xml\Linq\XObject.cs (1)
63public abstract XmlNodeType NodeType { get; }
System\Xml\Linq\XProcessingInstruction.cs (2)
85public override XmlNodeType NodeType 89return XmlNodeType.ProcessingInstruction;
System\Xml\Linq\XText.cs (2)
51public override XmlNodeType NodeType 55return XmlNodeType.Text;
System\Xml\Schema\XNodeValidator.cs (5)
45XmlNodeType nt = source.NodeType; 48case XmlNodeType.Document: 53case XmlNodeType.Element: 55case XmlNodeType.Attribute: 77if (nt == XmlNodeType.Attribute)
System\Xml\XPath\XNodeNavigator.cs (29)
16(1 << (int)XmlNodeType.Element) | 17(1 << (int)XmlNodeType.ProcessingInstruction) | 18(1 << (int)XmlNodeType.Comment); 22(1 << (int)XmlNodeType.Element), // Element 25(1 << (int)XmlNodeType.CDATA) | 26(1 << (int)XmlNodeType.Text), // Text 29(1 << (int)XmlNodeType.ProcessingInstruction), // ProcessingInstruction 30(1 << (int)XmlNodeType.Comment), // Comment 31(1 << (int)XmlNodeType.Element) | 32(1 << (int)XmlNodeType.CDATA) | 33(1 << (int)XmlNodeType.Text) | 34(1 << (int)XmlNodeType.ProcessingInstruction) | 35(1 << (int)XmlNodeType.Comment) // All 38(1 << (int)XmlNodeType.CDATA) | 39(1 << (int)XmlNodeType.Text); 206case XmlNodeType.Element: 208case XmlNodeType.Attribute: 211case XmlNodeType.Document: 213case XmlNodeType.Comment: 215case XmlNodeType.ProcessingInstruction: 274case XmlNodeType.Element: 276case XmlNodeType.Attribute: 278case XmlNodeType.Document: 281case XmlNodeType.Text: 282case XmlNodeType.CDATA: 284case XmlNodeType.Comment: 286case XmlNodeType.ProcessingInstruction: 927if (node is XDocumentType) throw new ArgumentException(SR.Format(SR.Argument_CreateNavigator, XmlNodeType.DocumentType)); 931if (text.GetParent() is XDocument) throw new ArgumentException(SR.Format(SR.Argument_CreateNavigator, XmlNodeType.Whitespace));
System.Security.Cryptography.Xml (7)
System\Security\Cryptography\Xml\CanonicalXmlDocument.cs (2)
35if (childNode.NodeType == XmlNodeType.Element) 52if (childNode.NodeType == XmlNodeType.Element)
System\Security\Cryptography\Xml\EncryptedXml.cs (1)
825if (parent.NodeType == XmlNodeType.Document)
System\Security\Cryptography\Xml\Utils.cs (3)
103return n.NodeType == XmlNodeType.Attribute && (n.Prefix.Equals("xmlns") || (n.Prefix.Length == 0 && n.LocalName.Equals("xmlns"))); 108return n.NodeType == XmlNodeType.Attribute && n.Prefix.Equals("xml"); 114bool b1 = n.NodeType == XmlNodeType.Attribute && n.Prefix.Length == 0 && n.LocalName.Equals("xmlns");
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (1)
181if (parent.NodeType == XmlNodeType.Document)
System.ServiceModel.Syndication (7)
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (7)
603case XmlNodeType.Element: 605case XmlNodeType.EndElement: 607case XmlNodeType.Text: 608case XmlNodeType.Whitespace: 609case XmlNodeType.SignificantWhitespace: 611case XmlNodeType.Comment: 613case XmlNodeType.CDATA:
System.Windows.Forms (11)
System\Resources\ResXResourceReader.cs (11)
351if (reader.NodeType == XmlNodeType.Element) 475_resHeaderVersion = reader.NodeType == XmlNodeType.Element ? reader.ReadElementString() : reader.Value.Trim(); 479_resHeaderMimeType = reader.NodeType == XmlNodeType.Element ? reader.ReadElementString() : reader.Value.Trim(); 483_resHeaderReaderType = reader.NodeType == XmlNodeType.Element ? reader.ReadElementString() : reader.Value.Trim(); 487_resHeaderWriterType = reader.NodeType == XmlNodeType.Element ? reader.ReadElementString() : reader.Value.Trim(); 494_resHeaderVersion = reader.NodeType == XmlNodeType.Element ? reader.ReadElementString() : reader.Value.Trim(); 497_resHeaderMimeType = reader.NodeType == XmlNodeType.Element ? reader.ReadElementString() : reader.Value.Trim(); 500_resHeaderReaderType = reader.NodeType == XmlNodeType.Element ? reader.ReadElementString() : reader.Value.Trim(); 503_resHeaderWriterType = reader.NodeType == XmlNodeType.Element ? reader.ReadElementString() : reader.Value.Trim(); 558if (reader.NodeType == XmlNodeType.EndElement 566if (reader.NodeType != XmlNodeType.Element)
System.Xaml (15)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (3)
172case XmlNodeType.Element: 183case XmlNodeType.EndElement: 750_inAttribute = (Reader.NodeType == XmlNodeType.Attribute);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlWrappingReader.cs (1)
43public override XmlNodeType NodeType { get { return _reader.NodeType; } }
System\Xaml\Parser\XamlScanner.cs (11)
177XmlNodeType xmlNodeType = _xmlReader.NodeType; 180case XmlNodeType.Element: 184case XmlNodeType.EndElement: 188case XmlNodeType.Text: 189case XmlNodeType.CDATA: 193case XmlNodeType.SignificantWhitespace: 194case XmlNodeType.Whitespace: 198case XmlNodeType.None: 247Debug.Assert(_xmlReader.NodeType == XmlNodeType.Element); 284Debug.Assert(_xmlReader.NodeType == XmlNodeType.Element); 429Debug.Assert(_xmlReader.NodeType == XmlNodeType.Element);
System.Xml (1)
System.Xml.cs (1)
219[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XmlNodeType))]
System.Xml.ReaderWriter (1)
artifacts\obj\System.Xml.ReaderWriter\Debug\net10.0\System.Xml.ReaderWriter.Forwards.cs (1)
147[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.XmlNodeType))]