语法分析器读取这棵树,并通过事件为应用程序描述它。
The parser reads the tree and describes it, through events, to your application.
在某些应用中,XML文档是仅由语法分析器建立的,而从不会由应用程序级代码建立,这是不相关的。
For certain USES where XML documents are built only by a parser, and never by application-level code, this is irrelevant.
SAX是基于事件的API,这意味着,语法分析器在处理XML文件时会将事件-类似于 AWT 的事件-发送到应用程序。
SAX is an event-based API, meaning that the parser sends events -- similar to AWT events -- to your application as it progresses through the XML file.
当它遇到第一个开始标记 <xbe:price-list> 时,语法分析器生成它的第二个事件来通知应用程序已经遇到了 price-list元素。
When it encounters the first opening tag, <xbe:price-list>, the parser generates its second event to notify the application that it has encountered the starting tag for a price-list element.
如果需要解析多个文档,使用程序集的分析器步骤中的String -Set或File - Set选项并在XMLstage之前对stages中的文档分区,将会大有裨益。
If many documents need to be parsed, it would be beneficial to use the String-Set or File-Set option in the parser step of the assembly and partition the documents in the stages before the XML stage.
但我发现,在没有语法分析器的情况下,从我的应用程序生成那些事件还是合算的。
But I have found that it pays to generate those events from my application, without a parser.
这些特殊的翻译标记不仅向XML结构提供了逻辑组织,而且允许围绕xml语法分析器构建应用程序,以理解如何处理全球化数据。
These special translation tags not only lend a logical organization to the XML structure, they also allow an application built around an XML parser to understand how to process the globalized data.
这不是一个内存使用分析器,而是一个应用程序瓶颈检测工具,用于发现代码中运行时间最长的地方。
This is not a memory usage profiler, but a tool used to detect application bottlenecks, the places in the code where most of processing time is spent.
语法分析器,代表应用程序解码XML文件的软件组件。
The parser, a software component that decodes XML files on behalf of the application.
该片段演示了如何将应用程序翻译处理与基本语法分析器功能相挂钩。
This fragment demonstrates how to hook your application-translation processing into the basic parser function.
本章集中讨论图1中的虚线-语法分析器和应用程序之间的接口或API(应用程序编程接口)。
This chapter concentrates on the dotted line in Figure 1 — the interface, or API (application Programming interface), between the parser and the application.
清单2在清单1中所示的源代码中添加一个类,并在语法分析器中注册该错误处理程序。
Listing 2 adds a class to the source shown in Listing 1 and registers that error handler with the parser.
分析器结果可以帮助标识应用程序的关键路径;即大部分时间所执行的代码。
Profiler results help you identify the critical path of your application; that is, the code that is executed most of the time.
在花费了我的职业生涯的可观部分,以一个应用程序开发者的身份盯着数据库分析器之后,我能为之证明。
Having spent a considerable portion of my career as an application developer staring at a profiler, I can attest to this.
下列示例假设您已经使用了sax语法分析器,并且十分熟悉SAX应用程序的基本机制。
The following examples assume that you have use of a SAX parser and are familiar with the basic mechanisms of a SAX application.
工件分析器处理指定工件的完整内容,查找各种常见错误,例如多线程应用程序中的死锁线程。
Artifact analysers process the entire contents of a given artifact looking for common errors such as deadlocked threads in a multithreaded application.
一旦注册完毕,当语法分析器处理文档时,语法分析器就会通知所有分析事件的内容处理程序。
Once registered, the parser notifies the content handler of all parse events as the parser processes the document.
其结果就是他们的应用程序受困于某个特定的语法分析器 --有时甚至是某个语法分析器的特定版本。
The result is that they lock their applications into a specific parser -- sometimes a specific version of a parser.
这样在应用程序在设备上运行时,分析器就会收集数据进行分析。
The application is then run on the device producing a report which is loaded into the profiler viewer for analysis.
目前分析器简单地跳过了所有的包含范型类型的程序集。
Right now the profiler simply skips all assemblies containing generics, but that's pretty annoying.
这没什么不寻常的:sax语法分析器的级别很低,所以应用程序必须接管本来由DOM才能完成的大量工作。
It's not abnormal: the SAX parser is very low level, so the application has to take over a lot of the work that a DOM parser would do.
正如其名称所暗示的,基于事件的语法分析器将事件发送给应用程序。
As the name implies, an event-based parser sends events to the application.
的确,在第一种情况中,应用程序编写了XSLT处理器可以立即分析的XML文档(通常通过sax语法分析器)。
Indeed, in the first case, the application writes the XML document, which the XSLT processor immediately parses (often through a SAX parser).
定义语法分析器类,应用程序员将定义一个'handler '类,该类将注册所使用的语法分析器。
Instead of defining a parser class, an application programmer defines a 'handler' class that is registered with whatever parser is used.
如果您还没有这一知识,则假设应用程序已经创建了sax语法分析器的实例以及能够实现or g . xml . sax .ContentHandler接口的类的实例。
If you don't have this knowledge, presume that the application has created an instance of the sax parser and an instance of a class that implements the org.xml.sax.ContentHandler interface.
应用程序员将定义一个handler类,而不是语法分析器类,该handler类能注册到任何所使用的语法分析器中。
Instead of defining a parser class, an application programmer defines a handler class that is registered with whatever parser is used.
在图2中,应用程序并没有写到文件中,而是直接调用处理器的ContentHandler,有效地模拟了语法分析器。
In Figure 2, instead of writing to a file, the application calls the processor's ContentHandler directly, effectively simulating the parser.
发现JConsole开销最简单的办法是,首先独自运行一个应用程序,然后在分析器下运行,并测量差异。
The easiest way to discover JConsole's overhead is to first run an application by itself, then run it under the profiler, and measure the difference.
在运行概要分析器applet或概要分析器应用程序的客户端机器上,执行下列步骤。
At the client machine where you run the profiler applet or the profiler application, perform the following steps.
因为sax语法分析器已经可以解析大多数URL,所以很少应用程序实现EntityResolver。
Because the SAX parser can resolve most URLs already, few applications implement EntityResolver.
应用推荐