Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Validate()

bool System.Xml.DocumentSchemaValidator.Validate ( XmlNode nodeToValidate)
inline

Definition at line 88 of file DocumentSchemaValidator.cs.

89 {
93 XmlNodeType nodeType = nodeToValidate.NodeType;
94 if (nodeType <= XmlNodeType.Attribute)
95 {
96 if (nodeType != XmlNodeType.Element)
97 {
98 if (nodeType != XmlNodeType.Attribute || nodeToValidate.XPNodeType == XPathNodeType.Namespace)
99 {
100 goto IL_00fe;
101 }
102 xmlSchemaObject = nodeToValidate.SchemaInfo.SchemaAttribute;
103 if (xmlSchemaObject == null)
104 {
106 if (xmlSchemaObject == null)
107 {
109 }
110 }
111 }
112 else
113 {
114 IXmlSchemaInfo schemaInfo = nodeToValidate.SchemaInfo;
116 if (schemaElement != null)
117 {
119 }
120 else
121 {
122 xmlSchemaObject = schemaInfo.SchemaType;
123 if (xmlSchemaObject == null)
124 {
125 if (nodeToValidate.ParentNode.NodeType == XmlNodeType.Document)
126 {
127 nodeToValidate = nodeToValidate.ParentNode;
128 }
129 else
130 {
132 if (xmlSchemaObject == null)
133 {
135 }
136 }
137 }
138 }
139 }
140 }
141 else if (nodeType != XmlNodeType.Document)
142 {
143 if (nodeType != XmlNodeType.DocumentFragment)
144 {
145 goto IL_00fe;
146 }
147 }
148 else
149 {
150 xmlSchemaValidationFlags |= XmlSchemaValidationFlags.ProcessIdentityConstraints;
151 }
152 _isValid = true;
155 {
156 if (_schemaInfo == null)
157 {
159 }
161 }
164 return _isValid;
165 IL_00fe:
167 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlDocument_NoNodeSchemaInfo
Definition SR.cs:1176
static string XmlDocument_ValidateInvalidNodeType
Definition SR.cs:1172
Definition SR.cs:7
void CreateValidator(XmlSchemaObject partialValidationType, XmlSchemaValidationFlags validationFlags)
XmlSchemaObject FindSchemaInfo(XmlElement elementToValidate)
XmlSchemaObjectTable GlobalElements

References System.Xml.DocumentSchemaValidator._attributeSchemaInfo, System.Xml.DocumentSchemaValidator._isValid, System.Xml.DocumentSchemaValidator._psviAugmentation, System.Xml.DocumentSchemaValidator._schemaInfo, System.Xml.DocumentSchemaValidator._schemas, System.Xml.DocumentSchemaValidator._startNode, System.Xml.DocumentSchemaValidator._validator, System.Xml.DocumentSchemaValidator.CreateValidator(), System.Xml.Dictionary, System.Xml.Schema.XmlSchemaValidator.EndValidation(), System.Xml.DocumentSchemaValidator.FindSchemaInfo(), System.SR.Format(), System.Xml.Schema.XmlSchemaSet.GlobalElements, System.Xml.Schema.IXmlSchemaInfo.SchemaElement, System.Xml.Schema.IXmlSchemaInfo.SchemaType, System.Xml.DocumentSchemaValidator.ValidateNode(), System.SR.XmlDocument_NoNodeSchemaInfo, and System.SR.XmlDocument_ValidateInvalidNodeType.