private void AppendChildText(StringBuilder builder) { for (XmlNode node = this.FirstChild; node != null; node = node.NextSibling) { if (node.FirstChild == null) { if (((node.NodeType == XmlNodeType.Text) || (node.NodeType == XmlNodeType.CDATA)) || ((node.NodeType == XmlNodeType.Whitespace) || (node.NodeType == XmlNodeType.SignificantWhitespace))) { builder.Append(node.InnerText); } } else { node.AppendChildText(builder); } } }
private void AppendChildText(StringBuilder builder) { for (XmlNode child = FirstChild; child != null; child = child.NextSibling) { if (child.FirstChild == null) { if (child.NodeType == XmlNodeType.Text || child.NodeType == XmlNodeType.CDATA || child.NodeType == XmlNodeType.Whitespace || child.NodeType == XmlNodeType.SignificantWhitespace) { builder.Append(child.InnerText); } } else { child.AppendChildText(builder); } } }