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

◆ ReplaceInitialChildText()

void System.Xml.XmlDataDocument.ReplaceInitialChildText ( XmlNode parent,
string value )
inlineprivate

Definition at line 1873 of file XmlDataDocument.cs.

1874 {
1875 XmlNode xmlNode = parent.FirstChild;
1876 while (xmlNode != null && xmlNode.NodeType == XmlNodeType.Whitespace)
1877 {
1878 xmlNode = xmlNode.NextSibling;
1879 }
1880 if (xmlNode != null)
1881 {
1882 if (xmlNode.NodeType == XmlNodeType.Text)
1883 {
1885 }
1886 else
1887 {
1888 xmlNode = parent.InsertBefore(CreateTextNode(value), xmlNode);
1889 }
1890 RemoveInitialTextNodes(xmlNode.NextSibling);
1891 }
1892 else
1893 {
1894 parent.AppendChild(CreateTextNode(value));
1895 }
1896 }
void RemoveInitialTextNodes(XmlNode node)
virtual XmlText CreateTextNode(string? text)

References System.Xml.XmlNode.AppendChild(), System.Xml.XmlDocument.CreateTextNode(), System.Xml.Dictionary, System.Xml.XmlNode.FirstChild, System.Xml.XmlNode.InsertBefore(), System.Xml.XmlDataDocument.RemoveInitialTextNodes(), and System.value.

Referenced by System.Xml.XmlDataDocument.OnColumnValueChanged().