我们还将向您展示如何重用解析器实例。
通过这种方式配置解析器可以提高处理属性的速度。
Configuring the parser in this way speeds up the processing of attributes.
有关格式的知识不在解析器中,而是在模型中,模型可由解析器在运行时直接访问,或者将其生成为解析器可调用的代码。
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.
您将告诉解析器何时获取下一个文档片段,而不是在解析器看到文档后告诉您所看到的内容。
Rather than being told what the parser sees when the parser sees it, you tell the parser when to go fetch the next piece of the document.
解析器的行为更像解释器,而不是编译器。
The parsers behave more like interpreters and are not compilers.
由于这个属性,解析器总是可以加载正确的模式。
Thanks to this property, the parser will always load the correct schema.
因此,解析器退出。
它围绕着文法创建解析器对象。
我们有能力借鉴众多解析器来自行开发用于编译的和一个解析器的内部实现。
We have the ability to translate from a number of parsers to an internal representation which we use for compilation.
大部分代码都在跟踪解析器的状态。
假定有一组特性和性质,解析器池应该从内部池中返回一个解析器,如果内部池中没有解析器,那么解析器池应该创建并保存一个新的解析器实例。
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.
因此为了获得较好的性能,我们强烈建议应用程序只在一个地方创建解析器,然后重用这个解析器实例。
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.
现在,填入由解析器来完成的动作。
首先构造一个解析器。
事实上每个xml解析器都知道它。
最后,清单6开始解析器循环。
用解析器验证枚举列表。
因为还要将该实例传递给解析器,所以解析器的操作将停止。
Since this instance was passed to the parser as well, the parser operation will stop.
有些工具不使用xml解析器。
它还包括一个rss解析器。
xml解析器能够处理任何字节流。
和解析器一样,它能生成SAX事件。
创建新的解析器工厂。
根据解析器操作说明更改这几行代码。
Change these lines of code according to the parser instruction.
它允许您的应用程序代码从解析器中获取事件,这与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解析器完全兼容。
This parser is fully compatible with the previous XML parser.
应用推荐