我们可以利用两个方法中的任何一个在类上启动树遍历。
We can use either of two methods on the java.nio.Files class to start the tree traversal.
应该熟悉下列与 XML 有关的计算机科学概念:树遍历、递归和数据重用。
You should be familiar with the following XML-related, computer-science concepts: tree traversal, recursion, and reuse of data.
每个XML文档均是定义良好的元素和属性树,并使用树遍历来表示XML查询。
Any XML document is a well-defined tree of elements and attributes, and XML queries are expressed in terms of tree traversal.
二叉树遍历的非递归算法相对于递归算法,减少了函数调用等开销,具有性能优势。
Compared with recursive algorithm for binary tree traversing, non-recursive algorithm reduces expenses of function calls, gains performance advantage.
注意声明方法:您指定如何处理元素,处理器(通过其内置的树遍历逻辑)决定何时应用模板。
Note the declarative approach: you specify what to do with the elements and the processor (through its built-in tree walking logic) decides when to apply a template.
这意味着仍然需要使用Element、Text这样的XML结构成分,仍然需要适当的树遍历。
This means that you still need to use XML structural constructs like Element or Text, and you still need to do a decent bit of tree walking.
对二叉树的遍历过程进行深入地研究,提出一种生成二叉树遍历序列的新方法,解决了二叉树遍历序列的生成问题。
By careful researches of the traversal of binary tree, a new method of traversing binary tree is brought forward, which is able to solve the problem of traversal of binary tree.
在我的代码中,计算由每个AST结点自己执行,但我们可能也将使用一个树遍历器来遍历每个结点,基于它的类型来执行。
In my code the evaluation is performed by each AST node itself, but we may use also a tree walker to walk each node and execute it based on its type.
运行时api,诸如dom,正在倾向于允许程序员编写XPath表达式而不是编写明确的树遍历代码(后者是一个痛苦的过程)。
Runtime APIs, such as DOM, are moving towards allowing programmers to write XPath expressions rather than writing explicit tree traversal code (which can be painful).
在这个步骤中,您将遍历源文件系统树。
In this step, you will traverse the source file system tree.
这两个函数均按照深度优先的顺序遍历树,但两者的差异在于先访问一个节点还是先访问其子节点。
Both functions walk the tree in depth-first order but they differ in whether a node is visited before or after its children.
这个调用将(以对数时间)遍历树,查找最靠近树根节点的电影公司电影汇总。
This will traverse the tree (in logarithmic time) and find the closest to the root node's summation of studio movies.
从XML文档内容显示的xml树可以直接编辑,从而促进轻松的遍历。
The XML tree displayed from the XML document content can be edited directly facilitating easy traversal.
您可以遍历文档树、删除节点或者嫁接新节点。
You can traverse the document tree, prune nodes, or graft on new ones.
然后遍历原始的文档树并复制到输出文档树中。
It then traverses the original document tree by copying it to the output document tree.
我们需要定义一个操作来遍历映射树、在树中搜索一个模式,并在该点应用一项操作。
We want to define an operation that walks over our tree of maps, searches for a pattern in the tree, and applies a manipulation at that point.
我们首先遍历树,传递一个仅打印所访问的节点并返回该节点的函数。
We first walk the tree and pass a function that merely prints the node being visited and returns the node.
一般而言,如果应用程序需要处理大型文档或者不大可能遍历整棵树时,应该使用这种延迟实现。
In general, you should use the deferred implementation if your application needs to process large documents and if your application is not intending to traverse the whole tree.
从这个根节点,就可以遍历整个xml树。
遍历树时,更改是在当前关注节点的本地做出的,也就是说除了向上移动之外,所有操作都是常量时间的。
As we traverse the tree, changes are local to the current focal node, meaning all constant-time operations except for up.
清单3是对清单2的改写,它使得树的遍历算法更明显。
Listing 3 is a rewrite of Listing 2 that makes the tree walking more explicit.
递归式遍历JSF组件树。
第2部分展示了如何通过遍历jsf组件树并获取输入组件的值来保存当前视图的表单数据。
Part 2 shows how to save the form data of the current view by traversing the JSF component tree and getting the values of the input components.
然后,JSF框架递归式地遍历组件树,更新组件状态。
Then, the JSF framework traverses the tree recursively, updating the state of the components.
而且,令人感兴趣的是,DB2返回结果时所依照的顺序暴露了递归如何逐层地而不是采用遍历树的方法进行处理。
Further, it is interesting to note that the order in which DB2 has returned the results exposes how the recursion is processed one level at a time, instead of using a tree-walk.
DB 2使用XSCAN操作符来遍历XML文档树,如需要,还将计算谓词和提取文档片断和值。
DB2 USES the XSCAN operator to traverse XML document trees and, if needed, to evaluate predicates and extract document fragments and values.
简单的非递归过程表达式并不能访问所有的元素,尽管许多库都包含有帮助功能,可以用于遍历树。
No simple non-recursive procedural expression accesses all elements, although many libraries include helper functions for walking the tree.
但是只用递归函数来遍历树并不十分困难。
But walking a tree just by using recursive functions is not all that difficult.
图10展示了在我们遍历树时位置结构发生了怎样的变化,在这里向下(始终下移至左侧第一个子节点),随后向右,然后再向下。
Figure 10 illustrates how the location structure changes as we traverse the tree, here going down (always to the first left child), then right, then down.
图10展示了在我们遍历树时位置结构发生了怎样的变化,在这里向下(始终下移至左侧第一个子节点),随后向右,然后再向下。
Figure 10 illustrates how the location structure changes as we traverse the tree, here going down (always to the first left child), then right, then down.
应用推荐