![]() |
![]() |
e-docs > WebLogic Server > WebLogic Server Frequently Asked Questions > FAQs: XML |
WebLogic Server Frequently Asked Questions
|
Q. Which XML parser comes with WebLogic Server 7.0?
A. We bundle the following two parsers with WebLogic Server 7.0:
The WebLogic XML Registry allows you to configure the parser you want to use for specific document types.
You can also use the WebLogic XML Streaming API to parse your XML documents. The Streaming API is based on the SAX API, but provides a more procedural, stream-based handling of XML documents rather than having to write SAX event handlers, which can get complicated when dealing with complex XML documents.
Q. Is an XSLT processor bundled in WebLogic Server?
A. Yes, we bundle an XSLT processor, based on Apache's Xalan 2.2 processor, in WebLogic Server 7.0.
Q. What version of the JAXP API specification is implemented in WebLogic Server 7.0?
A. Version 1.1. This version includes pluggable XML transformation as well as pluggable XML parsing.
Q. Can I use the getAttribute() and setAttribute() methods of Version 2.3 of the Java Servlet API to parse XML documents?
A. 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.
Q. Can I plug in a version of Apache's Xerces XML parser that is different to the one that is built-in with WebLogic Server 7.0 (Xerces 1.4.4)?
A. Yes. The version of Xerces that you can plug in, depends on the specific service pack of WebLogic Server 7.0 that you have installed.
If you have installed WebLogic Server 7.0.0.1 or lower on your computer, follow these instructions:
Warning: If you plug in version 2.0.0 or higher of Xerces, you cannot use the Xalan compatibility classes.
You can also put the xerces.jar file in the WEB-INF/lib directory of the WAR file of your application. In this case, be sure you do not enable the PreferWebInfClasses flag for your Web application.
If you have installed WebLogic Server 7.0 Service Pack 1 on your computer, follow these instructions:
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 7.0.0.1 or lower described in the beginning of this section.
Q. 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?
A. You must ensure that the version of Apache Xalan you download from the Apache Web site is compatible with the version of Apache Xerces you are using with WebLogic Server. This version is either the built-in version of 1.4.4 or one of the versions listed in the preceding question if you have plugged in your own version of Xerces.
Q. How do I identify the document type of an XML document?
A. 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.
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |