BEA Logo BEA WebLogic Server Release 6.1

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

  |  

  WebLogic Server Doc Home   |     FAQ   |   Previous Topic   |   Next Topic   |   Contents   |   View as PDF

FAQs: XML

 


Which XML parser comes with WebLogic Server 6.1?

We bundle a parser, based on Apache's Xerces 1.3.1 parser, in WebLogic Server 6.1. In addition, we include a WebLogic proprietary high-performance non-validating parser that you can use for small to medium sized XML documents. The WebLogic XML Registry allows you to configure the parser you want to use for specific document types.


Is an XSLT processor bundled in WebLogic Server?

Yes, we bundle an XSLT processor, based on Apache's Xalan 2.0.1 processor, in WebLogic Server 6.1.


What version of the JAXP API specification is implemented in WebLogic Server 6.1?

Version 1.1. This version includes pluggable XML transformation as well as pluggable XML parsing.


Can I use the getAttribute() and setAttribute() methods of Version 2.2 of the Java Servlet API to parse XML documents?

Yes. Use the setAttribute() method for SAX mode parsing and the getAttribute() method for DOM mode parsing. Using these methods in a Servlet, however, is a WebLogic-specific feature. This means that the Servlet may not be fully portable to other Servlet engines, so use the feature with caution.


Can I plug in a version of Apache's Xerces XML parser that is different to the one that is built-in with WebLogic Serve 6.1 (Xerces 1.3.1)?

Yes. The version of Xerces that you can plug in, depends on the specific service pack of WebLogic Server 6.1 that you have installed.

If you have installed WebLogic Server 6.1 Service Pack 2 or lower on your computer, follow these instructions:

You can plug in the following versions of Xerces:

  1. Delete all files that are prepended with the directory org/apache from the JAR file WL_HOME/lib/xmlx.jar, where WL_HOME refers to the installation directory of WebLogic Server.

  2. Copy every file that is prepended with the directory org/apache from the xerces.jar file (that you downloaded from the Apache Web site) into the xmlx.jar file.

    Alternatively, add the xerces.jar file to the end of the WebLogic Server CLASSPATH

    Alternatively, put the xerces.jar file into the META-INF/lib directory of your application. In this case, be sure you do not enable the PreferWebInf Classes flag for your Web application.

  3. Use the Administration console to configure the XML registry to use the parser and builder factories in org.apache.xerces.jaxp.*.

If you have installed WebLogic Server 6.1 Service Pack 3 on your computer, follow these instructions:

You can plug in any version of the Xerces XML parser.

To plug in a different verison of the Xerces parser, follow these steps:

  1. Put the xerces.jar file in the WEB-INF/lib directory of your application. Be sure you enable the PreferWebInf Classes flag for your Web application.

  2. Configure the parser and builder factories through files in the META-INF/services directory in one of the archives in WEB-INF/lib if they are not already present in the xerces.jar file.

    Warning: If you plug in a new version of Xerces using this procedure, you cannot use Administratin Console to configure the XML registry to configure the parser or entity resolution. If you need to configure the XML registry, use the procedure for plugging in new parsers for version 6.1 Service Pack 2 or lower described in the beginning of this section.


I plugged in a version of Apache Xalan that I downloaded from the Apache Web site, and now I get errors when I try to transform documents. What is the problem?

You must ensure that the version of Apache Xalan you plugged-in is compatible with the version of Apache Xerces that you are using (which is version 1.3.1 if you are using the built-in parser).


How do I identify the document type of an XML document?

If the XML document has a Public ID, then that is its document type. For example, if an XML document contains the following DOCTYPE declaration:

<!DOCTYPE mydoc PUBLIC "My public ID String" 
              "http://foo.com/url/to/my/dtd">

then its document type is My public ID String.

If the DOCTYPE declaration does not contain a Public ID, but specifies a System ID, then the document type is the System ID. For example, in the following DOCTYPE declaration:

<!DOCTYPE mydoc SYSTEM "http://foo.com/url/to/my/dtd">

the document type is http://foo.com/url/to/my/dtd.

Note: The System ID is of the DTD, not of the XML document itself. It can, however, still be used as a way to identify the XML document.

If the XML document does not specify a DOCTYPE declaration, then the document type can be either the root element name or the namespace URI, if it has one.

 

back to top previous page