它可以是文本节点,也可以是元素。
它接受单个元素、文本节点或注释。
第三个模板删除了所有文本节点。
简单回顾一下什么是文本节点。
清单29展示了忽略文本节点后的结果。
元素标签与元素文本节点是垂直堆放的。
The element labels and element text nodes are stacked vertically.
使用text伪函数进行文本节点搜索。
然后,该变量被用作追加文本节点的输入。
XML文档只需要解析元素与元素文本节点。
The XML document has only elements and element text nodes to parse.
我们将其文本节点的值分别设为空字符串和0。
We set the values of their text nodes to the empty string and 0, respectively.
文本节点值位于相应标签右侧的布局更为可取。
A layout in which the text node values are to the right of the corresponding labels would be preferable.
清单18中的模板将元素从文本节点中分离出来。
The templates in Listing 18 isolate the elements from the text nodes.
这个表达式选择元素的子元素之间的所有文本节点。
This expression selects all text nodes between the children of the element.
它返回在逻辑相邻的文本节点中所包含的所有文本。
This returns all the text contained in the logically-adjacent text nodes.
它带两个参数——替换文本节点和被替换的子元素。
This takes in two parameters — the replacement text node and the child element that it's replacing.
清单4展示如何提取包含在节点中的所有文本节点?
Listing 4 shows you how to extract all the text nodes contained in a node.
设置对应TextView小部件上的文本节点值。
Set the text node values on the corresponding TextView widgets.
所以可以有文本节点、元素节点和属性节点。
所有元素的子节点,包括文本节点,现在都是可用的。
All of the element's child nodes, including text nodes, are now available.
这是因为文本节点不是直接位于元素“book”下。
This is because there is no text node immediately under the element "book."
最后,真正需要的是title元素的文本节点孩子。
Finally, what you really want are the text node children of the title element.
可能需要规范化这个新元素的文本节点以简化后续操作。
Optionally, normalize the text nodes of this new element, to make sure things are easier later on.
遇到文本节点中的字符数据时便会调用此方法。
This is called when character data from text nodes is encountered.
例如,age元素有一个子元素,即文本节点10。
For example, the age element has one child, the text node 10.
您首先要确定元素标签,然后获得元素标签的文本节点值。
First, determine the element tag and then get the text node value for the element tag.
每个元素由元素节点表示,实际的数据值由文本节点表示。
Each element is represented by an element node, and the actual data values are represented by text nodes.
这个表达式现在返回两个文本节点:12和 4.95。
可能包含多个文本节点,以及注释和处理指令。
It might contain several, as well as comments and processing instructions. For instance, it could look like this.
在本例中,第一个模板规则匹配输入文档中的每个文本节点。
In this example, the first template rule matches every text node in the input document.
但是此类索引将包含xml列中所有文档的全部文本节点值。
However, such an index contains all text node values from all documents in the XML column.
应用推荐