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

◆ CheckValidity()

virtual bool System.Xml.XPath.XPathNavigator.CheckValidity ( XmlSchemaSet schemas,
ValidationEventHandler validationEventHandler )
inlinevirtualinherited

Reimplemented in System.Xml.DocumentXPathNavigator.

Definition at line 1189 of file XPathNavigator.cs.

1190 {
1194 switch (NodeType)
1195 {
1196 case XPathNodeType.Root:
1197 if (schemas == null)
1198 {
1200 }
1201 xmlSchemaType = null;
1202 break;
1203 case XPathNodeType.Element:
1204 {
1205 if (schemas == null)
1206 {
1208 }
1209 IXmlSchemaInfo schemaInfo = SchemaInfo;
1210 if (schemaInfo != null)
1211 {
1212 xmlSchemaType = schemaInfo.SchemaType;
1213 xmlSchemaElement = schemaInfo.SchemaElement;
1214 }
1215 if (xmlSchemaType == null && xmlSchemaElement == null)
1216 {
1218 }
1219 break;
1220 }
1221 case XPathNodeType.Attribute:
1222 {
1223 if (schemas == null)
1224 {
1226 }
1227 IXmlSchemaInfo schemaInfo = SchemaInfo;
1228 if (schemaInfo != null)
1229 {
1230 xmlSchemaType = schemaInfo.SchemaType;
1232 }
1233 if (xmlSchemaType == null && xmlSchemaAttribute == null)
1234 {
1236 }
1237 break;
1238 }
1239 default:
1241 }
1242 XPathNavigatorReader reader = (XPathNavigatorReader)CreateReader();
1243 CheckValidityHelper checkValidityHelper = new CheckValidityHelper(validationEventHandler, reader);
1244 validationEventHandler = checkValidityHelper.ValidationCallback;
1245 XmlReader validatingReader = GetValidatingReader(reader, schemas, validationEventHandler, xmlSchemaType, xmlSchemaElement, xmlSchemaAttribute);
1246 while (validatingReader.Read())
1247 {
1248 }
1249 return checkValidityHelper.IsValid;
1250 }
static string XPathDocument_MissingSchemas
Definition SR.cs:1354
static string XPathDocument_ValidateInvalidNodeType
Definition SR.cs:1358
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XPathDocument_NotEnoughSchemaInfo
Definition SR.cs:1356
Definition SR.cs:7
virtual ? IXmlSchemaInfo SchemaInfo
XmlReader GetValidatingReader(XmlReader reader, XmlSchemaSet schemas, ValidationEventHandler validationEvent, XmlSchemaType schemaType, XmlSchemaElement schemaElement, XmlSchemaAttribute schemaAttribute)
XmlSchemaAttribute? SchemaAttribute

References System.Xml.XPath.XPathNavigator.CreateReader(), System.SR.Format(), System.Xml.XPath.XPathNavigator.GetValidatingReader(), System.Xml.XPath.XPathNavigator.NodeType, System.Xml.Schema.IXmlSchemaInfo.SchemaAttribute, System.Xml.Schema.IXmlSchemaInfo.SchemaElement, System.Xml.XPath.XPathNavigator.SchemaInfo, System.Xml.Schema.IXmlSchemaInfo.SchemaType, System.SR.XPathDocument_MissingSchemas, System.SR.XPathDocument_NotEnoughSchemaInfo, and System.SR.XPathDocument_ValidateInvalidNodeType.