Over 10 Million Study Resources Now at Your Fingertips


Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Language:EN
Pages: 2

The parser controls the application thread

PULL PARSING VERSUS PUSH PARSING 89

Pull Parsing Versus Push Parsing

Streaming pull parsing refers to a programming model in which a client applica-tion calls methods on an XML parsing library when it needs to interact with an XML infoset—that is, the client only gets (pulls) XML data when it explicitly asks for it.

• Pull clients can read multiple documents at one time with a single thread.

• A StAX pull parser can filter XML documents such that elements unnec-essary to the client can be ignored, and it can support XML views of non-XML data.

• Marshalling an XML document

• Parallel document processing

90 STREAMING API FOR XML

• Parsing WSDL

Virtual data sources

Pipelined XML processing

A complete discussion of all these use cases is beyond the scope of this chapter. Please refer to the StAX specification for further information.

• StAX is a bidirectional API, meaning that it can both read and write XML documents. SAX is read only, so another API is needed if you want to write XML documents.

• SAX is a push API, whereas StAX is pull. The trade-offs between push and pull APIs outlined above apply here.

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Payment
Make payment
Document download
Download File
PageId: ELIE91A752
img
Uploaded by :
nDnzEoGx
Page 1 Preview
the parser controls the application thread
Sell Your Old Documents & Earn Wallet Balance