Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01

Library

Solution Area

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Oracle XML Components and General FAQs, 17 of 18


Frequently Asked Questions (FAQs) - General XML

This section includes general FAQs about Oracle XML technology.

There are also FAQs at the end of many chapters in the manual.

How do I Start Writing XML?

Question

I read some articles about XML, but how do I start writing it. If it is C,

1. in unix I open vi

2. include header files

3. open main

4. write some code

5. close main

6. compile (cc -o example example.c)

How do we do this in XML? XML is discussed in many journals, but there is no mention of how to start.

Answer

The easiest way to get started is to use the Oracle XSQL Servlet to leverage your understanding of SQL to begin experimenting with XML and XSLT Transformations. If you wait a day or so, a new release (0.9.8.6) with lots more tutorial info will be available, but the current release (0.9.6.2) is good to get started with and has extensive release notes to help you get started.

See our http://technet.oracle.com/tech/xml page and click on "Oracle XSQL Servlet".

XML and Required Oracle Tools

Question

I am exploring options to use Oracle's XML technology for generating data files. The generated data (XML) files would then be converted to "client specific" EDI text files using a "translator".

The translator would be used until such time that the client is ready to accept XML documents.

  1. What is the latest version of database II need to use? We have 8.0.6. Do we need Oracle8i?

  2. Is there a translator already available to convert XML to text files? Is XSL such a tool?

  3. Where and how would the translation mapping be stored?

Answer

You only need Oracle8i if you would like to generate the XML directly from the database instead of using a middle tier.

You can make Java calls to XML- SQL Utility from PL/SQL.

XML files are text files, but you can use XSL to transform the XML to almost any text-based format by creating the appropriate stylesheet.

Collecting Purchase Orders in XML: Creating an RFP in XML?

Question

I am going to develop a small application using XML and Oracle8i. Here is the scenario...Company A is having a central purchasing system. It has department B, C,D. And company A gets purchase order in XML format from B, C, D.

Now Company A needs to collect all Purchase orders and it has to store it in ORACLE8i database. And from that it has to create another "Request for proposal" for it's preferred vendors in XML.I am writing queries to insert or update into the Database. Tell me what are all the components I need to install in ORACLE8i.

Answer

Assuming you are using Java to implement you need the XML Parser and XML SQL Utility. If you are using a Java-based front-end to generate the purchase orders 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.

Portability: Using Parsers from Different Vendors?

Question

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

Answer

Not if you stick to SAX interfaces and/or DOM interfaces for your implementation. That's what the standard interfaces are in place to assist you with.

Browsers that Support XML

Question

Is there a list of browsers that support XML?

Answer

The following browsers support the display of XML:

XML Support for Oracle 8.0.x

Question

I have a customer who is currently architecting some of their future systems to run on XML based interfaces. The customer is a large Wall Street Institution. However their current systems are all running 8.0.6, and they would like to have some of their XML concepts implemented on the existing systems due to high demand.

The customer would like to know if there is currently or in the future any plans to support XML based code within the database or if there are any adapters / cartridges that they can use to get by.

Answer

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 just fine outside the database against 8.0.6. It's just that they won't be able to:

which are both Oracle8i-only features.

EDI and XML

Question

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

Answer

Here are some thoughts on the subject:

The next question then becomes: Is XML going to replace EDI? Probably not. We are going to see a coexistence of these two - at least for a while. Large companies with an existing investment in EDI won't switch. They are probably going to use XML as a way to extend their existing EDI-based implementation, which raises the new question of XML/EDI integration.

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

What Oracle Tools Support B2B Exchanges?

Question

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

Answer

Oracle participates in several B2B standard bodies:

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

In general, Oracle Internet Platform as a whole provides an integrated and solid platform for B2B exchanges.

Oracle's Direction Regarding XML?

Question

What is Oracle's direction regarding XML?

Answer

Oracle's XML strategy is to enable using XML in ways which exploit all of the benefits of Oracle's current technology stack. Today you can combine Oracle XML components with the Oracle8i database and Advanced Queueing (AQ) to achieve some degree of conflict resolution, transaction verification, and so on. Oracle is working to make future Oracle8i releases more seamless with regard to conflict resolution, transaction verification, distributed 2 Phase Commit transactions,....

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

For future releases, Oracle plans to support sending XML payloads using AQs. This involves making XML queriable from SQL. This is being implemented.

Oracle is active in all XML standards initiatives, including W3C XML Working Groups, Java Extensions for XML, Open Applications Group, and XML.org 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.

XML and BLOB (inside XML message)

Question

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?

Answer

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 CLOB Size?

Question

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

Answer

2 Gigabytes. See the "Oracle8i Application Developer's Guide - Large Objects (LOBs)" at http://technet.oracle.com/doc/server.815/a68004/toc.htm for lots more info on LOB's and CLOBs as well as http://technet.oracle.com/tech/java/sqlj_jdbc/index2.htm?Code&files/advanced/advanced.htm for sample code.

Oracle 7.3.4: Data Transfers to Other Vendors Using XML

Question

My company has 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 in order to do so. Is there any way of leveraging version 7 to do XML? I'm sure we'll move up to ver 8 sometime in the future but I don't know if we will within our timeline (next 3-4 months) for the next phase of the project I'm working on.

Answer

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, please take a look at http://technet.oracle.com/tech/java/sqlj_jdbc/ Take a look at: Oracle 7 JDBC OCI and JDBC Thin Drivers

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

Question

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

Answer

You need the following:

The first three can be obtained from Oracle.

The fourth from SUN.

If you want to do this from a browser, you'll also need the following:

Building an XML Application: Software Needed?

Question

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, JAVA etc., but I don't know how to start it in Oracle. What software I need from Oracle?

  1. Can I use Apache instead of Oracle's 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 were created by my programs?

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

Answer

  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 I 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. i.e. you cannot load all the XML tools into the server. But you can connect to the database by downloading the Oracle JDBC utility for ORacle 7 and run all the programs as client-side utilities.:

  3. Do I still need an XML Parser if all XML were created by my: programs? That depends on what you intend to do with the XML generated. If all 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 front.:

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

Standard DTDs to Use for Orders, Shipment,...

Question

We have implemented Oracle8i and the XDK. Where can we find just basic, standard DTDs to build on for Orders, Shipments, and Acknowledgements?

Answer

A good place to start would be http://xml.org which is being set up for this purpose.

DTD to Database Schema

Question

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

Answer

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 fed 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 http://technet.oracle.com/tech/xml.

Schema Map to XML

Question

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

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

  2. Can I use XML SQL Utilities in Pro*C? 3. What is limited size for generating XML doc. out from database? (If I can use Pro*C to call XSU)

Answer

  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.

XML in the Database: Performance

Question

I would like to know if there is a whitepaper which discusses the performance of XML and Oracle.

Answer

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

Faster Record Retrievals

Question

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(*) doesn't consider index, it takes nearly 20-30 seconds for the retrieved list to be seen on the browser window, if I just remove that count(*), the retrieval is quite fast, but then there is no previous and next as I had linked them to count(*).

Answer

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 IO's of the index blocks instead of a full-table scan.

Translating From Other Formats to XML

Question

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?

Answer

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 http://www.unidex.com/xflat.htm. I saw a presentation on XFlat at XML99 and it seemed to be good but I haven't tried it myself.

XML File Size Limitations

Question

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

Answer

There are no XML limitations to an XML File size.

Maximum Size XML Document?

Question

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

  2. The maximum size of XML document generated from Oracle8i to an XML document?

Answer

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

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

Generating Database Schema From a Rational Rose Tool

Question

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

Answer

All the parser/generator (petal files, xml...) 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's own packages as the base of the various generators may interest you.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Solution Area

Contents

Index