Chapter 18. XML

WebLogic provides extensive support for XML and XML-related APIs. Not surprisingly, it comes equipped with modern SAX and DOM parsers based on Apache’s Xerces 2.1.0, and an XSLT transformer based on the Xalan 2.2 libraries that is shipped with the JDK 1.4.1 distribution. It also is shipped with a FastParser, which is a high-performance nonvalidating SAX parser. WebLogic’s FastParser is optimized for small to medium-size documents, typical of a lot of SOAP and WSDL documents.

WebLogic implements the standard JAXP 1.1 layer, which provides a generic way to access any parser or transformer. Its XML Registry integrates with the JAXP implementation. This allows you to override the built-in parsers and transformers and specify alternative implementations that should be used under different circumstances. For example, you can set up different parsers to be based on the root element or document type information. These XML Registries can be configured on a per-server basis, giving you good control of what XML parsers should be used when. Of course, all these adjustments can be made without changing a single line of Java code.

XML documents often contain references to external entities. External entities, such as DTDs, are pieces of text external to the document being parsed. An XML Registry can be used to configure local mappings for these DTDs. If this is done, WebLogic can bypass a potentially time-consuming fetch for the DTD whenever XML data needs to be parsed. The ...

Get WebLogic: The Definitive Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.