Skip Headers

Oracle9i Application Developer's Guide - XML
Release 1 (9.0.1)

Part Number A88894-01
Go To Documentation Library
Go To Product List
Solution Area
Go To Table Of Contents
Go To Index

Go to previous page Go to next page

Oracle XML Developer Kits (XDKs) and Components: Overview and General FAQs

This chapter contains the following sections:

Oracle XML Components: Overview

This chapter provides an overview of Oracle's XML components.

Oracle9i provides several components, utilities, and interfaces you can use to take advantage of XML technology in building your Web-based database applications. Which components you use depends on your application requirements, programming preferences, development, and deployment environments.

The following XML components are provided with Oracle9i and Oracle9i Application Server:

The following figures schematically illustrate how the XDK components can be used to generate XML:

Development Tools and Other XML-Enabled Oracle9i Features

The following list includes Oracle's XML-enabled development tools:

XDK for Java

XDK for Java is composed of the following components:

XDK for Java Beans

XDK for Java Beans is composed of the following component:

XDK for C

XDK for C is composed of the following component:

XDK for C++

XDK for C++ is composed of the following:


XDK for PL/SQL is composed of the following:

XML Parsers

The Oracle XML parser includes implementations in C, C++, PL/SQL, and Java for the full range of platforms on which Oracle9i runs.

Based on conformance tests, ranked the Oracle parser in the top two validating parsers for its conformance to the XML 1.0 specification, including support for both SAX and DOM interfaces. The SAX and DOM interfaces conform to the W3C recommendations 2.0.

Version 2 (v2) of the Oracle XML parser provides integrated support for the following features:

The parsers are available on all Oracle platforms.

Figure 3-1 illustrates the Oracle XML Parser for Java. Figure 3-2 illustrates the Oracle XML parsers' overall functionality.

See Also:

Chapter 20, "Using XML Parser for Java" and Appendix C, "XDK for Java: Specifications and Cheat Sheets"

Figure 3-1 Oracle XML Parser for Java

Text description of adxml002.gif follows
Text description of the illustration adxml002.gif

Figure 3-2 The XML Parsers: Java, C, C++, PL/SQL

Text description of adxml001.gif follows
Text description of the illustration adxml001.gif

XSL Transformation (XSLT) Processor

The Oracle XSLT engine fully supports the W3C 1.0 XSL Transformations recommendation. It has the following features:

The Oracle XML Parsers, Version 2 include an integrated XSL Transformation (XSLT) Processor for transforming XML data using XSL stylesheets. Using the XSLT processor, you can transform XML documents from XML to XML, HTML, or virtually any other text-based format.

How to use the XSLT Processor is described in Chapter 20, "Using XML Parser for Java".

See Also:

Appendix C, "XDK for Java: Specifications and Cheat Sheets"

XML Class Generator

XML Class Generator creates a set of Java or C++ classes for creation of XML documents corresponding to an input DTD or XML Schema. Figure 3-3 shows Oracle XML Class Generator functionality.

How to use the XML Class Generators is described in the following chapters:

Figure 3-3 Oracle XML Java Class Generator

Text description of adxml003.gif follows
Text description of the illustration adxml003.gif

XML Transviewer Java Beans

Oracle XML Transviewer Java Beans are a set of XML components that constitute XML for Java Beans. These are used for Java applications or applets to view and transform XML documents.

They are visual and non-visual Java components that are integrated into Oracle JDeveloper to enable the fast creation and deployment of XML-based database applications. In this release, the following four beans are available:

As standard Java Beans, they can be used in any graphical Java development environment, such as Oracle JDeveloper. The Oracle XML Transviewer Beans functionality is described in Chapter 23, "Using XML Transviewer Beans".

Oracle XSQL Page Processor and Servlet

XSQL Servlet is a tool that processes SQL queries and outputs the result set as XML. This processor is implemented as a Java servlet and takes as its input an XML file containing embedded SQL queries. It uses XML Parser for Java, XML- SQL Utility, and Oracle XSL Transformation (XSLT) Engine to perform many of its operations.

You can use XSQL Servlet to perform the following tasks:

Servlet Engines that Support XSQL Servlet

XSQL Servlet has been tested with the following servlet engines:

JavaServer Pages Platforms that Support XSQL Servlet

JavaServer Pages can use <jsp:forward> or <jsp:include> to collaborate with XSQL Pages as part of an application. The following JSP platforms have been tested to support XSQL Servlet:

In general, it should work with the following:

XSQL Servlet is a tool that processes SQL queries and outputs the result set as XML. This processor is implemented as a Java servlet and takes as its input an XML file containing embedded SQL queries. It uses XML Parser for Java and XML SQL Utility to perform many of its operations.

Figure 3-4 shows how data flows from a client, to the servlet, and back to the client. The sequence of events is as follows:

  1. The user enters a URL through a browser, which is interpreted and passed to the XSQL Servlet through a Java Web Server. The URL contains the name of the target XSQL file (.xsql) and optionally, parameters, such as values and an XSL stylesheet name. Alternatively, the user can invoke the XSQL Servlet from the command line, bypassing the browser and Java web server.

  2. The servlet passes the XSQL file to the XML Parser for Java, which parses the XML and creates an API for accessing the XML contents.

  3. The page processor component of the servlet uses the API to pass XML parameters and SQL statements (found between <query></query> tags) to XML SQL Utility. The page processor also passes any XSL processing statements to the XSLT Processor.

  4. XML SQL Utility sends the SQL queries to the underlying Oracle9i database, which returns the query results to the utility.

  5. XML SQL Utility returns the query results to the XSLT Processor as XML formatted text. Results are embedded in the XML file in the same location as the original <query> tags.

  6. If desired, the query results and any other XML data are transformed by the XSLT processor using a specified XSL stylesheet. The data can be transformed to HTML or any other format defined by the stylesheet. The XSLT processor can selectively apply different stylesheets based on the type of client that made the original URL request. This HTTP_USER_AGENT information is obtained from the client through an HTTP request.

  7. The XSLT Processor passes the completed document back to the client browser for presentation to the user.

    See Also:

    Chapter 10, "XSQL Pages Publishing Framework" 

Figure 3-4 Oracle XSQL Page Processor and Servlet Functional Diagram

Text description of adxml017.gif follows
Text description of the illustration adxml017.gif

Oracle XML SQL Utility (XSU)

Oracle XML SQL Utility (XSU) supports Java and PL/SQL.

Figure 3-5 shows the Oracle XML SQL Utility overall functionality.

Figure 3-5 Oracle XML SQL Utility Functional Diagram

Text description of adxml012.gif follows
Text description of the illustration adxml012.gif

XML SQL Utility for Java consists of a set of Java classes that perform the following tasks:

Generating XML from Query Results

Figure 3-6 shows how XML SQL Utility processes SQL queries and returns the results as an XML document.

Figure 3-6 XMl-SQL Utility Processes SQL Queries and Returns the Result as an XML Document

Text description of adxml004.gif follows
Text description of the illustration adxml004.gif

XML Document Structure: Columns Are Mapped to Elements

The structure of the resulting XML document is based on the internal structure of the database schema that returns the query results:

XSU Generates the XML Document as a String or DOM Element Tree

The XML SQL Utility (XSU) generates either of the following:

XSU Generates a DTD Based on Queried Table's Schema

You can also use the XML SQL Utility (XSU) to generate a DTD based on the schema of the underlying table or view being queried. You can use the generated DTD as input to the XML Class Generator for Java or C++. This generates a set of classes based on the DTD elements. You can then write code that uses these classes to generate the infrastructure behind a Web-based form. See also "XML Class Generator".

Based on this infrastructure, the Web form can capture user data and create an XML document compatible with the database schema. This data can then be written directly to the corresponding database table or object view without further processing.

See Also:

Chapter 7, "XML SQL Utility (XSU)" and Oracle9i Case Studies - XML Applications, the chapter, "B2B XML Application: Step by Step", for more information about this approach. 


To write an XML document to a database table, where the XML data does not match the underlying table structure, transform the XML document before writing it to the database. For techniques on doing this, see Chapter 7, "XML SQL Utility (XSU)"

Oracle Text

Oracle Text (interMedia Text) extends Oracle9i by indexing any text or documents stored in Oracle9i. Use Oracle Text to perform searches on XML documents stored in Oracle9i by indexing the XML as plain text, or as document sections for more precise searches, such as find Oracle WITHIN title where title is a section of the document.


See Also:

Chapter 8, "Searching XML Data with Oracle Text", for more information on using Oracle Text and XML. 

Oracle XML Components: Generating XML Documents

Figure 3-7 through Figure 3-10 illustrate the relationship of the Oracle XML components and how they work together to generate XML documents from Oracle9i via a SQL query. The options are depicted according to language used:

Using Oracle XML Components to Generate XML Documents: Java

Figure 3-7 shows the Oracle XML Java components and how they can be used to generate an XML document. Available XML Java components are:

In the Java environment, when a user or client or application sends a query (SQL), there are three possible ways of processing the query using the Oracle XML components:

Regardless of which way the stored XML data is generated from the database, the resulting XML document output from the XML Parser is further processed, depending on what you or your application needs it for.

The XML document is formatted and customized by applying stylesheets and processed by the XSLT.

Figure 3-7 Generating XML Documents Using XDK for Java

Text description of adxml006.gif follows
Text description of the illustration adxml006.gif

Using Oracle XML Components to Generate XML Documents: C

Figure 3-8 shows the Oracle XML C language components used to generate an XML document. The XML components are:

SQL queries can be sent to the database via OCI or as embedded statements in the Pro*C precompiler.

The resulting XML data can be processed in the following ways:

This XML data is optionally transformed by the XSLT processor, viewed directly by an XML-enabled browser, or sent for further processing to an application or AQ Broker.

Figure 3-8 Generating XML Documents Using XDK for C

Text description of adxml029.gif follows
Text description of the illustration adxml029.gif

Using Oracle XML Components to Generate XML Documents: C++

Figure 3-9 shows the Oracle XML components used to generate an XML document. The XDK for C++ components used here are:

In the C++ environment, when a user or client or application sends a SQL query, there are two possible ways of processing the query using the XDK for C++:

Figure 3-9 Generating XML Documents Using XDK for C++

Text description of adxml030.gif follows
Text description of the illustration adxml030.gif

Using Oracle XML Components to Generate XML Documents: PL/SQL

Figure 3-10 shows the XDK for PL/SQL components used to generate an XML document:

In the PL/SQL environment, when a user or client or application sends a SQL query, there are two possible ways of processing the query using the Oracle XML components:

Figure 3-10 Generating XML Documents Using XDK for PL/SQL

Text description of adxml028.gif follows
Text description of the illustration adxml028.gif

Frequently Asked Questions (FAQs): Oracle XML-Enabled Technology

This section includes general questions about Oracle XML-enabled technology in the following categories:

There are Frequently Asked Questions at the end of several other chapters in this manual.

General XDK Questions

What XML Components Do I Need to Install?


I am going to develop a small application using XML and Oracle. Here is the scenario: Company A has is a central purchasing system with Departments B, C, and D. Company A gets purchase orders in XML format from B, C, and D.

Company A needs to collect all purchase orders and store them in an Oracle database. Then, it has to create another Request for proposal for its preferred vendors in XML. I am writing queries to insert or update into the database. What XML components do I need to install in Oracle?


Assuming you are using Java, you need the XML Parser and XML SQL Utility. If you are using a Java-based front end to generate the purchase orders, then the XML Class Generator can provide you with the classes you need to populate your purchase orders. Finally, the XSQL Servlet can help you build a Web interface.

Building an XML Application: What Software Is Needed?


I have a CGI-PERL-Oracle7 application on Solaris 2.6 and I want to convert it to XML/XSL-JAVA-Oracle. I know most parts of the technologies, for example, SGML, XML, and JAVA, but I don't know how to start it in Oracle. What software do I need from Oracle? Specifically,

  1. Can I use Apache instead of the Oracle Web server? If so, how?

  2. How far can I go with Oracle 7.3?

  3. Do I still need an XML Parser if all XML was created by my programs?

  4. What should be between the Web server and Oracle DB server? XSQL Servlet? Parser? JAVA VM? EJB? CORBA? SQLJ? JDBC? Oracle packages such as UTL_HTTP?


  1. Yes you can. The Apache web server must now interact with Oracle through JDBC or other means. See the XSQL servlet. This is a servlet that can run on any servlet-enabled Web server. This runs on Apache and connects to the database through a JDBC driver to the Oracle database.

  2. How far can you go with Oracle 7.3? You can go a long way. The only problem would be that you cannot run any of the Java programs inside the server, that is, you cannot load all the XML tools into the server. But you can connect to the database by downloading the Oracle JDBC utility for Oracle7 and run all the programs as client-side utilities.

  3. Do you still need an XML Parser if all XML was created by your programs? That depends on what you intend to do with the generated XML. If your task is just to generate XML and send it out then you might not need it. But if you wanted to generate an XML DOM tree then you would need the parser. Also, you would need it if you have incoming XML documents and you want to parse and store them somewhere. See the XML SQL utility for some help on this issue.

  4. What should be between the Web server and Oracle DB server? As explained before in Answer 1, you would need to have a servlet (or CGI) which interacts to Oracle through OCI or JDBC.

DTD to Database Schema


Is there a tool that goes from a DTD to a database schema?


Currently we do not have a tool to go from a DTD to a database schema as there is no way to specify datatypes until we have XML Schema. With our XML- SQL Utility available on OTN with our other XML components you can generate a DTD from a database schema which can then be entered into the Class Generator. You should try an approach your solution from that angle since a database is involved. Check out our OTN resource including the XML Discussion Forum for further assistance at

Schema Map to XML


My project requires converting master-details data to XML for clients.

  1. Is there a best way to design tables and generate XML (flat tables, objects, or collections)?

  2. Can I use XML SQL Utilities in Pro*C?

  3. Is there a limiting size for generating XML documents from database? Can I use Pro*C to call XSU?


  1. It really depends on what your application calls for. The generalized approach is to use object views and have the schema define the tag structure with database data as the element content.

  2. I am not aware of any limits beyond those imposed by the object view and the underlying table structure.

Are There XDK Utilities That Translate From Other Formats to XML?


Are there any utilities in the XDK that translate data from a given format to XML? I know that the XSLT will translate from XML to XML, HTML, or another text-based format. What about the other way around?


For HTML, you can use utilities like Tidy or JTidy to turn HTML into well-formed HTML that can be transformed using XSLT.

For random text formats, you can try utilities like XFlat at

Can Oracle Generate a Database Schema From a Rational Rose Generated XML File?


It is possible to generate database schema in Oracle using a script with CREATE TABLE, from an XML file generated by a Rational Rose design tool?


All the parser/generator files (such as petal files, XML, and so on) are developed in our project. All the components are designed for reuse, but developed in the context of a lager framework. You have to follow some guidelines, such as modeling in UML, and you must use the base class to get any benefit from our work.

Oracle only generates object types and delivers full object-oriented features such as inheritance in the persistence layer. If you did not need this, the Rational Rose (Petal-File) parser and Oracle packages as the base of the various generators may interest you.

Does Oracle Offer Any Tools to Create and Edit XML Documents?



How Can I Format XML Documents as PDF?



How Do I Load a Large XML Document Into the Database?

Question 1

I have a large (27 MB) data-centric XML document. I could not load it into the database when it was split into relational tables with XML SQL Utility, because the DOM parser failed (memory leak) during the XSLT processor execution. Do you have a workaround for this problem? Should I use SAX Parser? How do I use the XSLT processor and Sax Parser?

Answer 1a

If this is a one time load, or if the XML document you get always has the same tags, then you might consider using the SQL*Loader (direct path). All you have to do is compose a loader control file (see the Oracle9i Utilities manual, Chapter 3, for examples). You can use the enclosed by option to describe the fields. For example, in the files list you enter something like the following:

(empno    number(10)    enclosed by "<empno>" and "</empno>",...)

Except for the data parsing which has to be done the same regardless of what you are using, the actual loading into the database will be fastest with SQL*Loader (as the direct path writes data straight to data blocks, bypassing the layers in between).

Answer 1b

If the document is 27 MB because it is a very large number of repeating sub-documents, then you can use the sample code that comes in Chapter 14 of the book "Building Oracle XML Applications" by Steve Muench (O'Reilly) to load XML of any size into any number of tables. In Chapter 14, "Advanced XML Loading Techniques", the example builds an XML Loader utility that does what you are looking for.

Question 2

Can SQL*Loader handle nesting? That is, what if you have:


Is there a way to uniquely identify the two <price> elements?

Answer 2

Not really. The field description in the control file can be nested which is part of the support for object relational columns. The data record to which this maps is of course flat but using all the data-field description features of the SQL*Loader one can get a lot done. For example:



sample.ctl -- field definition part of the SQL Loader control file

field list ....
 emp  COLUMN OBJECT ....
        first      char(30)   enclosed by "<first>" and "</first>",
        last      char(30)   enclosed by "<last>" and "</last>",
        middle     char(30)   enclosed by "<middle>" and </middle>"
    friend COLUMN OBJECT ....
        first      char(30)   enclosed by "<first>" and "</first>",
        last      char(30)   enclosed by "<last>" and "</last>",
        middle     char(30)   enclosed by "<middle>" and </middle>"

Keep in mind that the COLUMN OBJECT field names have to match the ADT column in the database. Also, you will have to use a custom record terminator, otherwise it defaults to newline (that is, at every new line it thinks that is has data for a complete database record).

If your XML is more complex and you are trying to extract only select fields, you can use FILLER fields to reposition the scanning cursor, which scans from where it has left off towards the end of the record (or for the first field, from the beginning of the record).

The SQL*Loader has a very powerful text parser so you can do a lot of neat tricks. For loading XML when the document is very big, but consistent in its tags, you should consider it.

See Also:

Chapter 2, "Modeling and Design Issues for Oracle XML Applications", "Loading XML into a Database" , for guidelines on loading XML 

Portability and XML Support in Older Oracle Releases

Can I Use Parsers from Different Vendors?


I am currently investigating SAX. I understand that both the Oracle and IBM parsers use DOM and SAX from W3C.


You will not have to change your code if you stick to SAX interfaces or DOM interfaces for your implementation. That is what the standard interfaces are in place to assist you with.

Is There XML Support in Oracle 8.0.x?


We are currently architecting some of our future systems to run on XML-based interfaces. We are a large Wall Street institution. Our current systems are all running Oracle 8.0.6, and we would like to have some of our XML concepts implemented on the existing systems due to high demand.

Are there current or future plans to support XML-based code within the database, or are there any adapters or cartridges that we can use to get by?


All of our XML Developer's Kit components, including the XML Parser, XSLT Processor, XSQL Servlet, and utilities like the XML SQL Utility all work outside the database against Oracle 8.0.6. However, you will not be able to run XML components inside the database or use Oracle Text (interMedia) XML searching, which are both features in Oracle 8i and higher.

Oracle 7.3.4: Data Transfers to Other Vendors Using XML


My company has Oracle release 7.3.4 and my group is thinking of using XML for some data transfers between us and our vendors. From what I could see from this Web site, it looks like we would need to move to Oracle8i or higher in order to do so. Is there any way of leveraging Oracle release 7 to do XML?


As long as you have the appropriate JDBC 1.1 drivers for 7.3.4 you should be able to use the XML SQL Utility to extract data in XML.

For JDBC drivers, refer to for information about Oracle7 JDBC OCI and JDBC Thin Drivers.

If I Use Versions Prior to Oracle8i Can I use Oracle XML Tools?


  1. If I am using an Oracle version lower than Oracle8i, can I supply XML based applications using Oracle XML tools? If yes, then what are the licensing terms in that case?

  2. Is Oracle XML technology suitable for creating magtape files where the file is just a string of characters like 'abcdefg........' in a particular format? Is it is possible to create a stylesheet that will create these kind of files?


  1. XDKs for Java, C, and C++ can work outside the database, including the XML SQL Utility and XSQL Pages framework. Licensing is the same, free runtime. See OTN for the latest licenses.

  2. Yes. Just use <xsl:output method="text"/> to output plain text.

Browsers that Support XML

Browsers that Support XML


Is there a list of browsers that support XML?


The following browsers support the display of XML:


Are there Advantages of XML Over EDI?


We are considering implementing EDI to communicate requirements with our vendors and customers. I understand that XML is a cheaper alternative for smaller companies. Do you have any information on the advantages of XML over EDI?


Here are some thoughts on the subject:

The next question then becomes: is XML going to replace EDI? Probably not. The technologies will likely coexist, at least for a while. Large companies with an existing investment in EDI will probably use XML as a way to extend their EDI implementation, which raises a new question of XML and EDI integration.

XML is a compelling approach for smaller organizations, and for applications where EDI is inflexible.

What B2B Standards and Development Tools Does Oracle Support?


What B2B XML standards (such as ebXML, cxml, and BizTalk) does Oracle support? What tools does Oracle offer to create B2B exchanges?


Oracle participates in several B2B standards organizations:

For B2B exchanges, Oracle provides several alternatives depending on customer needs, such as the following:

Oracle Internet Platform provides an integrated and solid platform for B2B exchanges.

What is Oracle Corporation's Direction Regarding XML?


What is Oracle Corporation's direction regarding XML?


Oracle Corporation's XML strategy is to use XML in ways that exploit all of the benefits of the current Oracle technology stack. Today you can combine Oracle XML components with the Oracle8i (or higher) database and Advanced Queueing (AQ) to achieve conflict resolution, transaction verification, and so on. Oracle is working to make future releases more seamless for these functions, as well as for functions such as distributed two phase commit transactions.

XML data is stored either object-relational tables or views, or as CLOBs. XML transactions are transactions with one of these datatypes and are handled using the standard Oracle mechanisms, including rollback segments, locking, and logging.

From Oracle9i, Oracle supports sending XML payloads using AQ. This involves making XML queriable from SQL.

Oracle is active in all XML standards initiatives, including W3C XML Working Groups, Java Extensions for XML, Open Applications Group, and for developing and registering specific XML schemas.

XML Query

Oracle is participating in the W3C Working Group for XML Query. Oracle is considering plans to implement a language that allows querying XML data, such as in the XQL proposal. While XSLT provides static XML transformation features, a query language will add data query flexibility similar to what SQL does for relational data.

Oracle has representatives participating actively in the following 3C Working Groups related to XML/XSL: XML Schema, XML Query, XSL, XLink/XPointer, XML Infoset, DOM, and XML Core.

Are There Standard DTDs that We Can Use for Orders, Shipments, and So On?


We have implemented Oracle8i and the XDK. Where can we find basic, standard DTDs to build on for orders, shipments, and acknowledgements?


A good place to start would be this Web site: which is being set up for that purpose.


Is There Support for XML Messages in BLOBs?


Is there any support for XML messages enclosing BLOBs, or I should do it on an application level by encoding my binary objects in a suitable text format such as UUENCODE with a MIME wrapper?


XML requires all characters to be interpreted, therefore there is no provision for including raw binary data in an XML document. That being said, you could UUENCODE the data and include it in a CDATA section. The limitation on the encoding technique is to be sure it only produces legal characters for a CDATA section.

Maximum FileSizes

What is the Maximum XML File Size When Stored in CLOBs?


If we store XML files as CLOBs in the Oracle database, what is the maximum file size?


The maximum file size is 2 GB. See the Oracle9i Application Developer's Guide - Large Objects (LOBs) for more information on LOBs and CLOBs. For sample code, see

XML File Size Limitations


Are there any limitations in the size of an XML file?


There are no XML limitations to an XML file size.

Maximum Size for an XML Document


  1. Is there a maximum size for an XML document to provide data for PL/SQL (or SQL) across tables, provided that no CLOBs are used?

  2. What is the maximum size of XML document generated from Oracle to an XML document?


  1. The size limit should be what can be inserted into an object view.

  2. The size limit should be what can be retrieved from an object view.

Inserting XML Data Into Tables

What Do I Need to Insert Data Into Tables Using XML?


To select data for display and insert data to tables by XML what software do I need? We are using Oracle8i on Solaris.


You need the following software:

The first three can be obtained from Oracle. The fourth can be obtained from Sun Microsystems. If you want to perform the tasks from a browser, you will also need the following:

XML in the Database: Performance

Where Can I Find Information about the Performance of XML and Oracle?


Is there a whitepaper that discusses the performance of XML and Oracle?


Currently, we do not have any official performance analyses due to the lack of a performance standard or benchmark for XML products.

How Can I Speed Up the Record Retrieval in XML Documents?


I have a database with millions of records. I give a query based on some 4/5 parameters, and retrieve the records corresponding to that, I have added indexes in the database for faster retrieval of the same, but since the number of records returned is quite high and I planned to put a previous and next link to show only 10 records at a time, I had to get the count(*) of the number of records that match.

Since there are so many records, and count(*) does not consider index, it takes nearly 20-30 seconds for the retrieved list to be seen on the browser window. If I remove that count(*), the retrieval is quite fast, but then there is no previous and next as I had linked them to count(*).


I presume you are referring on a faster way to retrieve XML documents. The solution is to use SAX interface instead of DOM.

Make sure to select the COUNT(*) of an indexed column (the more selective the index the better), this way the optimizer can satisfy the count query with a few I/Os of the index blocks instead of a full-table scan.

Using XML With Different Languages


My application requires communication with outside entities that may have a totally different language system. If I need to put information in other languages (for instance, Chinese) into XML, do I need to treat and process them differently? For example, do I need to care which encoding they use, or would the parser be able to recognize it? Would there be any problems when dealing with the database?


XML inherently supports multiple languages in a single document. Each entity can use a different encoding from the others; that is, you could add a Chinese entity encoded in a Chinese encoding to the rest of the document. You could also treat all portions uniformly, regardless of the language used, by encoding in Unicode. Using the former, you must have an encoding declaration in the XML text declaration.

Oracle XML Parsers are designed to be able to handle most external entities and recognizes a wide range of encodings, including most widely used ones from all over the world.

The database should support all the languages you are going to use on XML. Chinese character sets like ZHS16GBK and ZHT16BIG5 are a superset of ASCII so you may be able to do with one of them to serve for English and Chinese, but you may want to use Unicode to use more languages.

Further References

Other XML Frequently Asked Questions

Here are some other XML Frequently Asked Question sites of interest:

Recommended XML and XSL Books


Can you please recommend a good XML or XSL book?


Go to previous page Go to next page
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Go To Product List
Solution Area
Go To Table Of Contents
Go To Index