ContentHandler declares the following events.
ContentHandler声明下列事件。
A serializer is a ContentHandler that writes its input in an XML document.
序列化程序是ContentHandler,它将其输入写入XML文档。
At this point, I've exhausted the most common applications of the ContentHandler interface.
至此,我已经介绍了ContentHandler接口的最常见应用。
An instance of the parser is obtained, and an instance of ContentHandler is registered on it.
得到了语法分析器的实例,并且在其上注册ContentHandler的实例。
ContentHandler defines events related to the document itself (such as opening and closing tags).
ContentHandler定义与文档本身关联的事件(例如,开始和结束标记)。
This accounts for the many different ways a parser is allowed to pass text into a ContentHandler.
这考虑到了解析器向ContentHandler传递文本的各种方式。
ContentHandler is the most commonly used SAX interface because it defines events for the XML document.
ContentHandler是最常用的SAX接口,因为它定义XML文档的事件。
XMLFilterImpl already implements most of the ContentHandler, blindly forwarding events to the next filter in the pipe.
XMLFilterImpl已经实现了ContentHandler的绝大部分,它盲目地将事件转发给管道中的下一个过滤器。
The ContentHandler introduced in Listing 1 simply counts the number of occurrences of the ulink element within simpara elements.
清单1所介绍的ContentHandler只是计算simpara元素中ulink元素出现的次数。
Still, it's easy to write a piece of glue code that picks up events from the provided StAX interface and drives a SAX ContentHandler.
不过很容易编写一段胶水代码,从提供的StAX接口接收事件并驱动SAX ContentHandler。
In Figure 2, instead of writing to a file, the application calls the processor's ContentHandler directly, effectively simulating the parser.
在图2中,应用程序并没有写到文件中,而是直接调用处理器的ContentHandler,有效地模拟了语法分析器。
If you're familiar with SAX parsing, you know that the ContentHandler creates the parsed data by reacting to the various events fired by the SAX parser.
如果熟悉SAX解析,会知道ContentHandler通过响应SAX解析器触发的各种事件创建解析数据。
Programmers still had to know the rudiments of SAX (like what a ContentHandler was and how to implement callback methods), but JAXP abstracted away many of these details.
程序员仍然需要了解SAX的基本原理(如什么是ContentHandler以及如何实现回调方法),但是JAXP抽象出了很多这样的细节。
Programmers still had to know the rudiments of SAX (like what a ContentHandler was and how to implement callback methods), but JAXP abstracted away many of these details.
程序员仍然需要了解SAX的基本原理(如什么是ContentHandler以及如何实现回调方法),但是JAXP抽象出了很多这样的细节。
应用推荐