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);
         }
     }
 }
示例#2
0
文件: xmlnode.cs 项目: ydunk/masters
 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);
         }
     }
 }