Chapter 4 XML Processing
Recommendation Summary
 In summary, choose the programming model and API processing according to your
needs. If you need to deal with the content and structure of the document, consider
using DOM and SAX because they provide more information about the document
itself than JAXB usually does. On the other hand, if your focus is more on the
actual, domain oriented objects that the document represents, consider using JAXB,
since JAXB hides the details of unmarshalling, marshalling, and validating the doc 
ument. Developers should use JAXB XML data binding if the document
content has a representation in Java that is directly usable by the application (that
is, close to domain specific objects). 
DOM, when used in conjunction with XPath, can be a very flexible and pow 
erful tool when the focus is on the content and structure of the document. DOM
may be more flexible than JAXB when dealing with documents whose schemas
are not well defined.
Finally, use XSLT to complement the three other processing models, particu 
larly in a pre  or post processing stage.
Figure 4.13 summarizes the different programming models from which the
developer can choose and highlights the intermediary representations (which have
a direct impact on performance) implied by each of them. Table 4.1 summarizes
the features of the three most prevalent XML programming models. 
Table 4.1
DOM, SAX, and XML Data Binding Programming Models
XML Data Binding
Tree traversal model
Event based model
Java bound content tree 
Random access (in memory 
Serial access (flow of events) 
Random access (in memory 
data structure) using generic 
using parameters passed to 
data structure) using Java 
(application independent) 
Beans style accessors

New Page 1

Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

java web hosting



 Our partners: | PHP: Hypertext Preprocessor | Best Web Hosting | Java Web Hosting | Inexpensive Web Hosting |

Jsp Web Hosting | Cheapest Web Hosting | Jsp Hosting | Cheap Hosting


Virtualwebstudio. Business web hosting division of Web Design Plus. All rights reserved