因?yàn)?/c>,JeffreySax是一位非常受人尊敬的經(jīng)濟(jì)學(xué)家,他說(shuō)——讓我來(lái)解決稅收問(wèn)題。
As you know from A brief history lesson, when you work with SAX, your first step is to create a new SAXParserFactory.
通過(guò)簡(jiǎn)要的歷史回顧您知道,使用SAX的第一步是創(chuàng)建新的SAXParserFactory。
As you know, SAX parsing requires you to write a ContentHandler that processes parser events.
您知道,SAX語(yǔ)法分析要求您編寫處理語(yǔ)法分析器事件的ContentHandler。
One morning as I sax draped in a long gown - it must have been about ten o' clock - I heard some footsteps out in the courtyard.
一天早晨,大概有十點(diǎn)來(lái)鐘吧,我正披著件長(zhǎng)袍在屋中坐著,我聽(tīng)見(jiàn)院中有點(diǎn)腳步聲。
JAXP initially had the goal to remove some of the vendor-specific details, related to which XML parser was used, from SAX and DOM code.
最初,JAXP的目標(biāo)是從SAX和DOM代碼中移除一些特定于供應(yīng)商的信息(涉及到所使用的XML解析器)。
Unlike DOM, SAX is not endorsed by an official standardization body, but it is widely used and is considered a de facto standard.
與DOM不同,SAX沒(méi)有經(jīng)過(guò)官方標(biāo)準(zhǔn)機(jī)構(gòu)的認(rèn)可,但是它被廣泛使用并被視為事實(shí)上的標(biāo)準(zhǔn)。
If it's dereferenced in an attribute value, this attack can even damage a SAX-based system by overflowing the limits of a string.
如果與屬性值沒(méi)有任何關(guān)聯(lián),那么這種攻擊甚至可以通過(guò)溢出字符串限制來(lái)損害基于SAX的系統(tǒng)。
But a combined Singaporean and Australian exchange -- call it SAX -- does create a new attraction that could make up for it.
但如果有一個(gè)“新加坡-澳大利亞交易所”誕生(姑且稱為“新澳所”),則會(huì)形成一種新的吸引力,從而有可能彌補(bǔ)這個(gè)劣勢(shì)。
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.
不過(guò)很容易編寫一段膠水代碼,從提供的StAX接口接收事件并驅(qū)動(dòng)SAXContentHandler。
Sax: God, I turn out to be such a damsel in distress.
哦,天哪,我竟然成為了一個(gè)如此悲慘的女人。
This means that SAX can discard those parts of the document that are not in scope at the time, which makes it more efficient.
這意味著SAX可以拋棄暫時(shí)不在范圍中的文檔部分,這使得它更高效。
Just rewrite a few lines of code to use SAXParser instead of DOMBuilder and you're ready to add SAX-specific error handling.
只需要重寫一些代碼,使用SAXParser代替DOMBuilder即可,這樣就可以開(kāi)始添加與SAX有關(guān)的錯(cuò)誤處理了。
SAX -- like the parser modules it provides an API for -- is essentially a sequential processor of an XML document.
SAX--如同它提供的語(yǔ)法分析器模塊的API--基本上是一個(gè)XML文檔的順序處理器。
Soprano voice ; soprano sax; the boy still had a fine treble voice; the treble clef .
高音;高音薩克斯管;這個(gè)男孩仍舊有極好的高音;高音譜號(hào)。
SAX, as you may know, is an event-oriented programming API for parsing XML documents.
正如您可能知道的,SAX是一個(gè)用于解析XML文檔的面向事件的編程API。
Through SAX events, your application listens to the flow of the document and, supposedly, generates the appropriate response.
通過(guò)SAX事件,應(yīng)用程序偵聽(tīng)文檔流,并且按照需要生成相應(yīng)的響應(yīng)。
Instead , SAX is mostly just a way to save memory while extracting data from an XML document .
反而,主要將SAX作為從XML文檔抽取數(shù)據(jù)時(shí)節(jié)省內(nèi)存的一種方法。
The next step is to implement the getter and setter methods for the various interfaces that SAX uses.
下一步就是為SAX使用的各種接口實(shí)現(xiàn)getter和setter方法。
Being able to reuse SAX handler is great, but it is a somewhat complicated piece of code.
能夠重用SAX處理程序是非常不錯(cuò)的,但其代碼稍微有些復(fù)雜。
At any time during a parse, it is possible to register a new content handler, as stated in the SAX specification.
正如SAX規(guī)范中所說(shuō)的那樣,在解析過(guò)程中的任意時(shí)刻,都可以注冊(cè)一個(gè)新的內(nèi)容處理程序。
If you do this, you get a few special techniques that the SAX interface does not provide.
如果這樣做,您就能獲得SAX界面并不提供的一些特殊技巧。
Then the SAX parsing is handled manually with the returned handler as the means of dealing with content.
然后,使用返回的處理程序手動(dòng)處理SAX解析,對(duì)內(nèi)容進(jìn)行處理。
Because SAX is event driven, you'll want to be notified of, and react to, any errors that occur during validation.
因?yàn)?/c>SAX是由事件驅(qū)動(dòng)的,所以您需要在驗(yàn)證期間發(fā)生任何錯(cuò)誤的時(shí)候得到通知,并對(duì)它作出反應(yīng)。
JAXP would still have the benefit of making translation between SAX and DOM easy, but this would be a nice nod to the XML community.
JAXP將仍然受益于在SAX和DOM之間輕易轉(zhuǎn)換,不過(guò)對(duì)于XML社區(qū)來(lái)說(shuō)將會(huì)是一個(gè)很大的欣喜。
En. The implementation of a SAX filter in most object-based SAX systems is as a specialized handler class.
大多數(shù)基于對(duì)象的SAX系統(tǒng)中的SAX過(guò)濾器實(shí)現(xiàn)都是作為專門的處理程序類。
When a SAX parsing process runs across this entity reference, it has to resolve the entity into another piece of content.
當(dāng)SAX解析過(guò)程運(yùn)行到該實(shí)體引用時(shí),它必須將該實(shí)體解析成另一段內(nèi)容。
Apart from XML basics, you'll need at least a conceptual understanding of SAX to make use of the suggestions in this article.
除了了解XML基礎(chǔ)知識(shí),您至少還需要理解SAX的概念,從而能采用本文中的一些建議。
SAX filters allow you to construct complex XML processing behaviors from simple, independent modules.
SAX過(guò)濾器允許您從簡(jiǎn)單的獨(dú)立模塊構(gòu)造復(fù)雜的XML處理。
At a more macroscopic level, an entire Saxon transformation can also be manipulated as a SAX filter.
從更宏觀的角度看,整個(gè)Saxon轉(zhuǎn)換還可以當(dāng)作SAX過(guò)濾器來(lái)進(jìn)行操作。
The SAX parser, the document handler, and the external classes for the other elements do not need any changes.
SAX解析器、文檔處理程序以及用于其他元素的外部類都不需要作任何修改。
Readers may be familiar with the XML equivalents based around the SAX-style libraries.
讀者可能對(duì)基于XML的SAX風(fēng)格的程序庫(kù)比較熟悉。
The SAX programmer writes callback method implementations that are the snippets of code executed upon these various event occurrences.
SAX程序員編寫回調(diào)方法實(shí)現(xiàn)它們,是在發(fā)生這些各種事件時(shí)執(zhí)行的代碼片段。
As you learned in Part 1, JAXP is a layer over SAX and DOM that enables Java programmers to perform vendor-neutral XML parsing.
在第1部分中了解到,JAXP是位于SAX和DOM之上的層,它允許Java程序員執(zhí)行開(kāi)發(fā)商中立的XML解析。