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

◆ EnsureDocumentElement()

XmlElement System.Xml.XmlDataDocument.EnsureDocumentElement ( )
inlineprivate

Definition at line 405 of file XmlDataDocument.cs.

406 {
407 XmlElement xmlElement = base.DocumentElement;
408 if (xmlElement == null)
409 {
410 string text = XmlConvert.EncodeLocalName(DataSet.DataSetName);
411 if (text == null || text.Length == 0)
412 {
413 text = "Xml";
414 }
415 string text2 = DataSet.Namespace;
416 if (text2 == null)
417 {
418 text2 = string.Empty;
419 }
420 xmlElement = new XmlBoundElement(string.Empty, text, text2, this);
422 }
423 return xmlElement;
424 }

References System.Xml.AppendChild, System.Data.DataSet.DataSetName, System.Xml.Dictionary, System.Xml.XmlConvert.EncodeLocalName(), System.Data.DataSet.Namespace, and System.text.

Referenced by System.Xml.XmlDataDocument.DemoteDocumentElement(), System.Xml.XmlDataDocument.EnsureNonRowDocumentElement(), and System.Xml.XmlDataDocument.OnAddRow().