1 Introduction

This chapter summarizes the XML features of WebLogic Server, describes the WebLogic Server XML examples, and provides a variety of links to additional XML information.

Samples for the XML Developer

In addition to this document, Oracle provides a variety of code samples for XML developers. The examples and tutorials illustrate WebLogic Server XML in action, and provide practical instructions on how to perform key XML development tasks.

Oracle recommends that you run some or all of the XML examples before programming your own application that processes XML.

XML Examples in the WebLogic Server Distribution

WebLogic Server optionally installs API code examples in the ORACLE_HOME\wlserver\samples\server directory, where ORACLE_HOME represents the directory in which you installed WebLogic Server. For more information about the WebLogic Server code examples, see Sample Applications and Code Examples in Understanding Oracle WebLogic Server.

Summary of WebLogic Server XML Features

WebLogic Server consolidates XML technologies applicable to WebLogic Server and XML applications based on WebLogic Server. The WebLogic Server XML subsystem allows customers to use standard parsers, the WebLogic FastParser, XSLT transformers, and DTDs and XML Schemas to process and convert XML files.

The following topics, which describe the features included in the WebLogic Server XML subsystem, are presented in this section:

XML Document Parsers

WebLogic Server uses, by default, the XML parser that is included in the JDK.

You can also use any other XML parser of your choice by using the WebLogic Remote Console to configure it in the XML Registry. You can configure a single instance of WebLogic Server to use one parser for a particular application and use another parser for a different application.

For information about parsing XML documents, see Parsing XML Documents.

XML Document Transformer

WebLogic Server uses, by default, the XML transformer that is included in the JDK.

You can also use any other XML transformer of your choice by using the WebLogic Remote Console to configure it in the XML Registry. You can configure a single instance of WebLogic Server to use one transformer for a particular application and use another transformer for a different application.

For more information about transforming XML documents, see Transforming XML Documents.

Streaming API for XML (StAX) Implementation

WebLogic Server includes an implementation of the Streaming API for XML (StAX).

See Using the Streaming API for XML (StAX).

WebLogic XPath API

The WebLogic XPath API contains all of the classes required to perform XPath matching against a document represented as a DOM, an XMLInputStream, or an XMLOutputStream.

See Using the WebLogic XPath API.

JAXP Pluggability Layer Implementation

WebLogic Server supports the JAXP APIs provided by the supported JDK. Standard JAXP factory methods select implementations through the JAXP lookup mechanism. For WebLogic-managed XML processing, the XML Registry can supply parser and transformer factories at server or application scope, and can select a parser for a server-registry entry identified by public ID, system ID, or root element.

See Administering WebLogic Server XML, including Configuring a Parser or Transformer Other Than the Default, for the server-wide WebLogic Remote Console workflow; see XML Application Scoping for application configuration.

WebLogic Servlet Attributes

WebLogic Server supports the following special Servlet attributes:

  • org.xml.sax.HandlerBase

  • org.xml.sax.helpers.DefaultHandler

  • org.w3c.dom.Document

Calling the setAttribute (for SAX parsing) and getAttribute (for DOM parsing) methods on a ServletRequest object with the preceding attributes will parse any given XML document.

See Parsing XML Documents in a Servlet.

XML Registry For Configuring Parsers and Transformers

The XML Registry simplifies administration and configuration tasks by separating these tasks from the XML application. Use the WebLogic Remote Console to configure the parsers and transformers for an instance of WebLogic Server.

See XML Parser and Transformer Configuration Tasks.

XML Registry for Configuring External Entity Resolution

WebLogic XML supports external entity resolution through the XML Registry. See External Entity Configuration Tasks.

Selecting XML Parser and Transformer Providers

The endorsed-standards override mechanism was removed in JDK 9. To select parser or transformer providers for WebLogic-managed XML processing, use the WebLogic Server XML Registry. For standalone JAXP code, use the provider-selection mechanisms documented by SAXParserFactory.newInstance, DocumentBuilderFactory.newInstance, TransformerFactory.newInstance.

Learning More About XML

To learn more about XML, see the following online courses and tutorials. XML Reference, provides links to additional information.