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

◆ GetInitialTextFromNodes()

string System.Data.XmlDataLoader.GetInitialTextFromNodes ( ref XmlNode n)
inlineprivate

Definition at line 189 of file XmlDataLoader.cs.

190 {
191 string text = null;
192 if (n != null)
193 {
194 while (n.NodeType == XmlNodeType.Whitespace)
195 {
196 n = n.NextSibling;
197 }
198 if (IsTextLikeNode(n.NodeType) && (n.NextSibling == null || !IsTextLikeNode(n.NodeType)))
199 {
200 text = n.Value;
201 n = n.NextSibling;
202 }
203 else
204 {
206 while (n != null && IsTextLikeNode(n.NodeType))
207 {
208 stringBuilder.Append(n.Value);
209 n = n.NextSibling;
210 }
211 text = stringBuilder.ToString();
212 }
213 }
214 if (text == null)
215 {
216 text = string.Empty;
217 }
218 return text;
219 }
bool IsTextLikeNode(XmlNodeType n)

References System.Data.XmlDataLoader.IsTextLikeNode(), and System.text.

Referenced by System.Data.XmlDataLoader.LoadRowData(), and System.Data.XmlDataLoader.LoadTopMostTable().