For example, get the element tag name as in Listing 18.
例如,像清单18中一样获得元素标签名称。
Use the elemtext String variable, which was set for event type START_TAG, to get the element tag name.
可以使用elemtextString变量来获得元素标签名称,该变量是为事件类型START _ TAG设置的。
When you grab an element's child, as you have to in this case, you get the element node, then navigate to all its child nodes, and iterate over them.
像这种情况下访问元素的子元素时,必须首先取得元素节点然后遍历所有的子元素节点。
One thing to consider about the code: in DOM, the first node represents the document as a whole, so, to get the element book to read the namespaces, you have to go to the children exactly one time.
有关此代码,有一点需要注意:在DOM中,第一个节点代表整个文档,所以,要让元素book读取这些名称空间,必须访问子节点刚好一次。
People thought that synthesizing this element, making it artificially was the only way to get it.
人们认为人工合成这种元素是获得它的唯一途径。
Wherever the largest element started out in the list, by the time I get through it, it's at the end.
无论列表中最大的元素从哪开始,当我完成它的时候,它就在最后。
Accessing such nodes in the source by use of the namespace axis or copying an element to get its namespace.
通过使用命名空间轴或者复制元素来得到其命名空间来访问这样的节点。
Get the children of the element.
得到元素的子节点。
You could get the data in an element, work with its children, find out the value of an attribute... and that's really about it.
您可以从某个元素中获得数据,操作其子元素,找出某个属性的值等,全部都是这方面的操作。
Such an approach guarantees that you will always get the whole content of an element regardless of included comments, processing instructions, or sub-elements.
这种方法可以保证您始终能够获得元素的完整内容,不管它是否包含注释、处理质量或子元素。
And in the next spot, maybe I've got a really long list, and I'm going to say how to jump to get to the next element.
可能我得存放一个很长的列表了,你们也明白如何定位下一个元素,好的,这很棒,这样我有一个。
The second code block (lines 6-7) just passes the root element of the document off to the recursive modification method I'll get to in a moment.
第二个代码块(第6 -7行)只是将文档的根元素传递给我马上要谈到的递归修改方法。
From there you can get the type and name of the element, as well as its contents.
您可以从这里获得元素的类型和名称及其内容。
You can get StAX events from any element, regardless of whether the object model is fully built or not.
可以从任何元素获得StAX事件,而不管是否完整构建了对象模型。
So wherever the largest element started out in the list, by the time I get through it, it's at the end.
所以无论最大的元素,在列表的什么位置。
You can, for instance, use XMLReader, a stream parser, to get an element, import it into the DOM and extract data using XPath.
比方说,可以使用流解析器XMLReader获取一个元素,将其导入DOM,然后用XPath提取数据。
To get data for the element, remember to test the data type of each HSSFCell, so you know which getter method to use.
要得到元素数据,请记住测试每个HSSFCell的数据类型,以便知道使用哪个getter方法。
To get this information, you start at the level of the form element itself.
要获得这个信息,必须从form元素本身开始。
Get access to the element that is the parent — that is, the container — of the current img element.
访问当前img元素的父元素,也就是它的容器。
The required attribute is used during form validation (more on that below) and the autofocus attribute lets you pick the element on the page too get focus.
required属性用于表单验证(下面将详细介绍)过程中,autofocus属性允许选择页面上的元素以获取焦点。
You can then edit attributes of the GET activity to point to the desired element. For example, suppose that you want to get the details on an instance with ID in your environment
然后,可以编辑GET活动的属性,指向想要的元素。
In both cases, you get the last element from the first element, which is what you were looking for.
在两种情况下,您都得到第一个元素中的最后一个元素,这正是您在寻找的。
Similarly, you can already probably come to the conclusion that for every way to get information from a page element, you can also set the information on those elements.
同样地,您自己可能已经有了这样的结论:如果能从页面元素获得信息,那么也应该可以在这些元素上放置信息。
First, determine the element tag and then get the text node value for the element tag.
您首先要确定元素标签,然后获得元素标签的文本节点值。
It can also save time, if it turns out (as it often does) that the only thing done with the node-set is to test whether it is empty, or to get the value of its first element.
它还可以节省时间,如果对于节点集的唯一操作就是测试它是否是空的(通常是这种情况),或者对它的第一个元素进行赋值。
When using: :, the right-hand-most element must be a list, or you'll get an error message.
在使用:时,最右边的元素必须是一个列表,否则将得到一个错误消息。
Then the code uses the registered database definition created in the sample to get the database-specific model element factory.
然后,使用前面创建的注册的数据库定义获得特定于数据库的模型元素工厂。
This element tells the XSLT processor to get all of the text and child elements of the current element and transform them as well.
该元素告诉XSLT处理器获取当前元素的所有文本和子元素并转换它们。
But before we can do that, we need to get the volume element.
在此之前,我们需要知道体积元。
But before we can do that, we need to get the volume element.
在此之前,我们需要知道体积元。
应用推荐