|Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)
Part Number A86030-01
Oracle XML Components and General FAQs, 17 of 18
This section includes general FAQs about Oracle XML technology.
There are also FAQs at the end of many chapters in the manual.
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.
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".
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.
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.
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.
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.
I am currently investigating SAX. I understand that both the Oracle and IBM parsers use DOM and SAX from W3.
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.
Is there a list of browsers that support XML?
The following browsers support the display of XML:
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.
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.
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?
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 B2B XML standards does Oracle support (ebXML, cxml, BizTalk, ...)? What tools does Oracle offer to create B2B exchanges?
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.
What is Oracle's direction regarding XML?
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.
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.
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.
If we store XML files as CLOBs in the Oracle8i database, what is the maximum file size?
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.
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.
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
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.
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:
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?
We have implemented Oracle8i and the XDK. Where can we find just basic, standard DTDs to build on for Orders, Shipments, and Acknowledgements?
A good place to start would be http://xml.org which is being set up for this purpose.
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 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.
My project required converting master-details data to XML for clients.
I would like to know if there is a whitepaper which discusses the performance of XML and Oracle.
Currently, we do not have any official performance analyses due to the lack of a performance standard/benchmark for XML products.
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(*).
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.
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 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.
Are there any limitations in the size of an XML file?
There are no XML limitations to an XML File size.
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?
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.