Example #1
0
 public static void VisitElements(XElement source, XElementVisitor func, int depth)
 {
     func(source, depth);
     foreach (XElement child in source.Elements())
     {
         VisitElements(child, func, depth + 1);
     }
 }
Example #2
0
 public static void VisitElements(this XElement source, XElementVisitor func)
 {
     VisitElements(source, func, 0);
 }