使用XNI的方法与SAX是非常相似的(实际上,在Xerces 中,SAX解析器是本机 XNI 解析器之上很薄的一层)。
The approach with XNI is very similar to that of SAX. (In fact, in Xerces, the SAX parser is a thin layer on top of the native XNI parser.)
有关格式的知识不在解析器中,而是在模型中,模型可由解析器在运行时直接访问,或者将其生成为解析器可调用的代码。
The knowledge of the format is not in the parser but in the model, which is either accessed directly by the parser at run time, or generated into code that the parser invokes.
假定有一组特性和性质,解析器池应该从内部池中返回一个解析器,如果内部池中没有解析器,那么解析器池应该创建并保存一个新的解析器实例。
Given a set of features and properties, the parser pool should either return a parser from an internal pool or create and store a new parser instance if one does not exist.
我们有能力借鉴众多解析器来自行开发用于编译的和一个解析器的内部实现。
We have the ability to translate from a number of parsers to an internal representation which we use for compilation.
根据事务上下文选择一个请求解析器,请求解析器对请求业务对象进行解析;这个对象的头包含一个控制对象,体包含一个事务对象。
A request parser is chosen based on the transaction context to parse out the request business object which contains a control object as the header and a transaction object as the body.
这些选项是一组作为节点属性公开的选项,这些属性在运行时传递给特定解析器,从而使解析器的行为可以在每个节点的基础上受到控制。
These are a set of options exposed as node properties that are passed to a specific parser at runtime, thereby allowing its behaviour to be controlled on a per node basis.
因此为了获得较好的性能,我们强烈建议应用程序只在一个地方创建解析器,然后重用这个解析器实例。
Consequently, in order to achieve better performance, we strongly recommend that your application create a parser once and then reuse this parser instance.
其中的主要原因在于WPF设计器已经拥有了自己的解析器,而重写该解析器以使用这个公共解析器将要花费大量时间。
A major reason for this is that the WPF designers already have their own parsers and rewriting them to use the common parser will take a significant amount of time.
因为还要将该实例传递给解析器,所以解析器的操作将停止。
Since this instance was passed to the parser as well, the parser operation will stop.
由此,所生成的添加到类中的代码不是特定于特定解析器的,或者甚至不是特定于特定的解析器类型。
Because of this, the generated code that gets added to your classes is not specific to a particular parser, or even to a particular type of parser.
清单9中有一些值得注意的细节,首先考虑到的是SAX解析器是一个基于事件的解析器,这就意味着使用SAX进行解析时要建立真实文件。
Listing 9 contains some noteworthy items. The first thing to consider is that the SAX parser is an event-based parser, which means that you build the actual document as it is parsed.
例如,如果您有五种不同的COBOL数据结构,您将编写五个特定于格式的解析器,并将格式信息硬编码到解析器程序代码中。
For example, if you have five different COBOL data structures, you write five format-specific parsers, with the format information hard-wired into the parser program code.
在使用推方式的情况下,由解析器来控制解析操作,需要向解析器提供要解析的文档和处理程序。
With a push approach, the parser is in control of the parsing operation — you give the parser a document to parse and a handler reference.
它允许您的应用程序代码从解析器中获取事件,这与SAX解析器自动将事件推入处理程序相反。
It allows your application code to pull or seek events from the parser, as opposed to the SAX parser that automatically pushes events to the handler.
每块XML数据可以附加到文件后;或提供给SAX解析器,该解析器作用于元素和内容并在处理完毕后废弃XML数据块。
Each block of XML could be appended to a file; or it could be fed to a SAX parser that ACTS on the elements and contents and discards it once processed.
SQL解析器和XML 解析器在DB2编译器中交互,但是它们预期使用不同代码页的输入。
The SQL parser and the XML parser interact within the DB2 compiler, but they expect their input in different code pages.
此解析器与以前的xml解析器完全兼容。
This parser is fully compatible with the previous XML parser.
更复杂的解析器通常都使用这些内置解析器对象创建。
More complex parsers are typically created using these built-in parser objects.
通常提供SAX驱动程序的解析器都把底层的解析器事件转化成SAX标准事件,以支持代码的移植。
In general, parsers provide SAX drivers that translate low-level parser events into SAX standard events, allowing for portable code.
前面已经提到,解析器回调应用程序以建立数据模型,解析器处于控制地位。
The parser issues callbacks to the application to build the data model, as discussed before, but the parser is in control.
在这种情况下需要一个解析器,该解析器可以根据这些内存转储生成有意义的日志消息。
A parser is required in such cases, which generates meaningful log messages out of those memory dumps.
应用程序应当在需要获得解析器时,与解析器池进行交互。
The application should interact with your parser pool implementation each time it needs to get a parser.
为了访问插件解析器的功能,必须使用解析器类名。
To access the plug-in parser's functionality, the parser class name must be used.
作为解析器设计者,您可以将解析前后所有与解析器有关的动作置于该文件中。
This is the place where you, the parser designer, can place all of your pre - and post-parsing activity related to your parser.
显然,我们还没有结束(解析工作还没有完成),但是现在有了基本的解析器语义,接下来只需通过扩展解析器产生元素来生成ast元素。
OK, we're clearly not finished (there's parsing work yet to be done), but the basic parser semantics are in place, requiring only that we extend the parser production elements to produce AST elements.
虽然PSGML包含sgml解析器,但是它仍不是一个具有完整功能的解析器。
Although PSGML contains an SGML parser, it is not a fully functional parser.
xml解析器:其中给出了面向不同编程语言的完整的xml解析器列表。
XML parsers: Read a comprehensive list of XML parsers for many programming languages.
为了通过这种API得到解析器,首先需要取得相应的解析器工厂,比如SAXParserFactory,然后再使用工厂创建解析器。
To obtain a parser with this API, you first need to retrieve a corresponding parser factory — such as a SAXParserFactory — and use it to create the parser.
这通常不会导致问题出现,除非您非常“幸运”,但这肯定会导致解析器错误,这种解析器错误会导致令人迷惑、难以调试的呈现错误。
This isn't generally going to cause trouble unless you're very, very unlucky, but it can certainly cause parser errors that lead to confusing and hard-to-debug rendering errors.
编译器的前端是特定于语言的,它包括一个用于给定语言的解析器,这个解析器产生经过解析的树和中间表示(Register Transfer Language,RTL)。
The front end of a compiler is language specific and includes a parser for the given language that results in parsed trees and the intermediate representation (the Register Transfer language, or RTL).
应用推荐