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

◆ ValidateNode()

override void System.Xml.Linq.XDocument.ValidateNode ( XNode node,
XNode previous )
inlinepackagevirtual

Reimplemented from System.Xml.Linq.XContainer.

Definition at line 423 of file XDocument.cs.

424 {
425 switch (node.NodeType)
426 {
427 case XmlNodeType.Text:
428 ValidateString(((XText)node).Value);
429 break;
430 case XmlNodeType.Element:
431 ValidateDocument(previous, XmlNodeType.DocumentType, XmlNodeType.None);
432 break;
433 case XmlNodeType.DocumentType:
434 ValidateDocument(previous, XmlNodeType.None, XmlNodeType.Element);
435 break;
436 case XmlNodeType.CDATA:
437 throw new ArgumentException(System.SR.Format(System.SR.Argument_AddNode, XmlNodeType.CDATA));
438 case XmlNodeType.Document:
439 throw new ArgumentException(System.SR.Format(System.SR.Argument_AddNode, XmlNodeType.Document));
440 }
441 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Argument_AddNode
Definition SR.cs:16
Definition SR.cs:7
void ValidateDocument(XNode previous, XmlNodeType allowBefore, XmlNodeType allowAfter)
Definition XDocument.cs:443
override void ValidateString(string s)
Definition XDocument.cs:474

References System.SR.Argument_AddNode, System.Xml.ArgumentException, System.Xml.Dictionary, System.SR.Format(), System.Xml.Linq.XDocument.ValidateDocument(), System.Xml.Linq.XDocument.ValidateString(), and System.Xml.Linq.Value.