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

◆ FindSchemaInfo() [2/2]

XmlSchemaObject System.Xml.DocumentSchemaValidator.FindSchemaInfo ( XmlElement elementToValidate)
inlineprivate

Definition at line 449 of file DocumentSchemaValidator.cs.

450 {
451 _isPartialTreeValid = true;
453 int num = 0;
454 XmlNode parentNode = elementToValidate.ParentNode;
455 do
456 {
457 xmlSchemaInfo = parentNode.SchemaInfo;
458 if (xmlSchemaInfo.SchemaElement != null || xmlSchemaInfo.SchemaType != null)
459 {
460 break;
461 }
463 _nodeSequenceToValidate[num++] = parentNode;
464 parentNode = parentNode.ParentNode;
465 }
466 while (parentNode != null);
467 if (parentNode == null)
468 {
469 num--;
470 _nodeSequenceToValidate[num] = null;
471 return GetTypeFromAncestors(elementToValidate, null, num);
472 }
474 _nodeSequenceToValidate[num++] = parentNode;
476 if (xmlSchemaObject == null)
477 {
478 xmlSchemaObject = xmlSchemaInfo.SchemaType;
479 }
481 }
XmlSchemaObject GetTypeFromAncestors(XmlElement elementToValidate, XmlSchemaObject ancestorType, int ancestorsCount)
virtual ? XmlNode ParentNode
Definition XmlNode.cs:76

References System.Xml.DocumentSchemaValidator._isPartialTreeValid, System.Xml.DocumentSchemaValidator._nodeSequenceToValidate, System.Xml.DocumentSchemaValidator.CheckNodeSequenceCapacity(), System.Xml.DocumentSchemaValidator.GetTypeFromAncestors(), System.Xml.XmlNode.ParentNode, and System.Xml.XmlNode.SchemaInfo.

Referenced by System.Xml.DocumentSchemaValidator.FindSchemaInfo(), and System.Xml.DocumentSchemaValidator.Validate().