Oracle
  Home arrow Oracle arrow Page 4 - Loading and Unloading XML Files Using Oracle 10G XE
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ORACLE

Loading and Unloading XML Files Using Oracle 10G XE
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 4
    2006-12-20


    Table of Contents:
  • Loading and Unloading XML Files Using Oracle 10G XE
  • From Table to XML
  • Importing an XML File into Oracle 10G XE
  • Importing a simplified, contrived XML file

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Loading and Unloading XML Files Using Oracle 10G XE - Importing a simplified, contrived XML file
    ( Page 4 of 4 )

    The steps involved in importing are very similar to exporting, so we will pick up at the point where you are ready to import an XML as shown in the next picture.

    Here we need to take a break, because we do not have a table into which this XML file can be imported. For XML data such as that shown above, how do we construct a table? We attempt to create a table named 'ARGENTINA' in Oracle 10G XE using the following script. We can test and verify in the SQL utility available.

    When you try to export this table to an XML file you will see that, unless the table is populated, you cannot export the table.

    The next picture shows an exported file after creating a row in the table.

    Now we want to create an XML file and then load it into the ARGENTINA table in the HR database.

    Here is the XML file used for this purpose. Only the CustomerID and KeyVal have been altered.

    Now when you click on the Load button you will get the following message stating that the load succeeded.

    Now you can see in the object Browser the contents of the ARGENTINA table as shown in the next picture.

    Summary

    Importing XML data into Oracle 10G XE is not as easy as exporting a table to XML formatted data. This same type of difficulty was experienced while importing XML into MS Access 2003. The error messages when importing fails provided by Oracle 10G XE are not very useful as they do not provide any clue. The reason for this difficulty in the case of Oracle appears to be related to the non-standard way XML data may be authored. When one follows the rules to produce Canonical XML the import is easy.



     
     
    >>> More Oracle Articles          >>> More By Jayaram Krishnaswamy
     

       

    ORACLE ARTICLES

    - Oracle's Turn to Play in the Sun
    - Implementing and Using Oracle`s Restore Poin...
    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek