GetNextSibling() public method

public GetNextSibling ( ) : XmlNode
return XmlNode
Example #1
0
 public static void printRecursive(XmlNode node)
 {
     printIndent();
     Console.Write("+--");
     Console.Write("<"+node.Name+" "+node+" >\n");
     nodes++;
     if(node.ElementType==XmlElementType.XML_ELEMENT_NODE)
     {
         XmlElement el=(XmlElement)node;
         indent+=4;
         foreach(XmlAttr ar in el.Attributes)
         {
             printIndent();
             Console.Write("+--");
             Console.WriteLine(ar.Name+" => "+ar.Value);
         }
         indent-=4;
     }
     if(node.GetFirstChild()!=null)
     {
         indent+=2;
         printRecursive(node.GetFirstChild());
         indent-=2;
     }
     if(node.GetNextSibling()!=null)
     {
         printRecursive(node.GetNextSibling());
     }
 }
Example #2
0
 public static void printRecursive(XmlNode node)
 {
     printIndent();
     Console.WriteLine("<"+node.FQName+" "+node+">");
     if(node.GetFirstChild()!=null)
     {
         indent+=2;
         printRecursive(node.GetFirstChild());
         indent-=2;
     }
     if(node.GetNextSibling()!=null)
     {
         printRecursive(node.GetNextSibling());
     }
 }
Example #3
0
 public static void printRecursive(XmlNode node)
 {
     printIndent();
     Console.Write("+--");
     Console.WriteLine(node.Name);
     if(node.GetFirstChild()!=null)
     {
         indent++;
         printRecursive(node.GetFirstChild());
         indent--;
     }
     if(node.GetNextSibling()!=null)
     {
         printRecursive(node.GetNextSibling());
     }
 }