예제 #1
0
파일: Node.cs 프로젝트: bkzhn/dcsoup
 /// <summary>
 /// Perform a depth-first traversal through this node and its descendants.
 /// </summary>
 /// <param name="nodeVisitor">the visitor callbacks to perform on each node</param>
 /// <returns>this node, for chaining</returns>
 internal Node Traverse(INodeVisitor nodeVisitor)
 {
     Validate.NotNull(nodeVisitor);
     NodeTraversor traversor = new NodeTraversor(nodeVisitor);
     traversor.Traverse(this);
     return this;
 }
예제 #2
0
파일: Cleaner.cs 프로젝트: bkzhn/dcsoup
 private int CopySafeNodes(Element source, Element dest)
 {
     Cleaner.CleaningVisitor cleaningVisitor = new Cleaner.CleaningVisitor(this, source, dest);
     NodeTraversor traversor = new NodeTraversor(cleaningVisitor);
     traversor.Traverse(source);
     return cleaningVisitor.numDiscarded;
 }