Database to xml

How to convert database data to xml file useing Oracle9i?

Please read "XML Database Developer's Guide - Oracle XML DB" (http://otn.oracle.com/docs/products/oracle9i/content.html). Especially section 10 should be interesting for you!
Stefan

Similar Messages

  • Issue to load data from database to XML file. error: ODI-40768

    Hi,
    While I am trying to load data from database to XML following error is appearing.
    ODI-1228: Task TEST_XML_DATA (Integration) fails on the target XML connection MyLOCALXSD.
    Caused By: java.sql.SQLException: ODI-40768: Could not save the file <default>:C:\DATA_FILE\www.xml because a class java.io.IOException occurred and said: The filename, directory name, or volume label syntax is incorrect
         at com.sunopsis.jdbc.driver.xml.SnpsXmlFile.writeToFile(SnpsXmlFile.java:751)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlConnection.internalExecute(SnpsXmlConnection.java:769)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlPreparedStatement.execute(SnpsXmlPreparedStatement.java:46)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:166)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    jdbc url: jdbc:snps:xml?d=C:\test_xsd.xsd&s=TESTSQL&re=employeesX&ro=true
    physical schema: TESTSQL
    Knowledge modules are:
    LKM: LKM SQL to SQL
    IKM: IKM XML Control Append
    CKM: CKM SQL
    Parameters set are:
    CREATE_XML_FILE: true
    XML_PATH:<default>:C:\DATA_FILE\www.xml
    I have tried to change the directory path but error is still there.
    Could some one please help me to resolve the issue?
    Regards,
    user1672911

    Hi,
    The trouble in "<default>:"  - if you set XML_PATH as C:\DATA_FILE\www.xml instead  <default>:C:\DATA_FILE\www.xml- it will work correctly.
    Greetings,
    Eugene

  • How to convert Oracle database to XML standard?

    I have a project to convert oracle database to XML standard.And get it to show in webpage.Please tell me for do it.Tell about the way to do it.Tell me some kit to do it.

    Hi,
    otn says like this
    "You can use the XML SQL Utility to generate a DTD based on the schema of the underlying table being queried. You can use the generated DTD as input to the XML Class Generator for Java, which will generate a set of classes based on the DTD elements. You can then write Java code that use these classes to generate the infrastructure behind a web-based form. Based on this infrastructure, the web form will capture user data and create an XML document compatible with the database schema."
    use 'mlsql utility'
    regards
    raghavan

  • How to connect mysql database using xml

    welcome to all,
    here my doubt is how to connect mysql database using xml file, how to integrate xml file and jsp file and how to access data from dabase using jsp file. can any one help me
    regards

    Short answer: you wouldn't do any of those things. The first two are meaningless and the third is a bad practice. I have no idea what those ideas were supposed to achieve so I have no idea what tutorials I should suggest to you.

  • How to write from database to XML file using JAVA and back..

    Hi....
    I am strugling for a code to write from database to xml output instead of what i have written in flat file....could anyone please help me out...to do this and again read the same back to the database using java...

    Hi,
    In java world, there is a tutorial on what you are looking for :
    http://www.javaworld.com/javaworld/jw-01-2000/jw-01-dbxml_p.html
    It uses SAX/DOM parsers to translate XML data into the appropriate fields of the database and visa-versa.
    Hope it helps.

  • Export Advanced Recordset from Database into XML

    I don't think I was clear on my previous post about my goal
    with Exporting an advanced MySQL query to an XML file.
    Simple example: I have a photo gallery that has pictures of
    various Architect Projects. The main page shows distinct images of
    various projects (like an index). When one clicks on this image to
    view the rest of the Project details, a detail page opens with more
    information and additional images within this project.
    I want to use Spry/Ajax to give the images nice dynamic
    effects on the detail page. Normally to get from an index page to a
    detail page using normal server-side procedures, one would have to
    set up a dynamic link to the detail page by passing the recordID
    thru a URL Parameter. The detail page would have a recordset query
    that would call the URL Parameter so that the distinct record
    chosen will be the only record displayed.
    When exporting this query from the database to XML, for some
    reason the following query only displays the <row> node in
    the schema when creating a Dataset. See the following sql query
    that I am trying to use on the detail page to create the dataset
    via XML:
    SELECT*
    FROM project_tbl
    WHERE projectID = [URL PARAM] projectID
    Why, when creating a dataset in Spry and exporting it into
    XML, will this query NOT work?
    What can I do to make this work? URGENT HELP will be kindly
    appreciated.

    Danilo,
    I do not have a link yet as the files are on my remote
    server. I have implemented the code you sent me but still no luck.
    Please see the code I have below:
    The XML Generating Page:
    <?php require_once('../Connections/plymouth.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "", $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
    "'" : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    break;
    return $theValue;
    ?>
    <?php
    // Query the database and get the selected records from
    Project & Images
    $colname_rsProject = "-1";
    if (isset($_GET['projectID'])) {
    $colname_rsProject = (get_magic_quotes_gpc()) ?
    $_GET['projectID'] : addslashes($_GET['projectID']);
    mysql_select_db($database_plymouth, $plymouth);
    $query_rsProject = sprintf("SELECT * FROM projects_tbl WHERE
    projectID = %s", GetSQLValueString($colname_rsProject, "int"));
    $rsProject = mysql_query($query_rsProject, $plymouth) or
    die(mysql_error());
    $row_rsProject = mysql_fetch_assoc($rsProject);
    $totalRows_rsProject = mysql_num_rows($rsProject);
    // Send the headers
    header('Content-type: text/xml');
    header('Pragma: public');
    header('Cache-control: private');
    header('Expires: -1');
    ?>
    <?php echo('<?xml version="1.0"
    encoding="utf-8"?>'); ?>
    <root>
    <?php if ($totalRows_rsProject > 0) { // Show if
    recordset not empty ?>
    <?php do { ?>
    <row>
    <?php foreach ($row_rsProject as $column=>$value) {
    ?>
    <<?php echo $column; ?>><?php echo
    $row_rsProject[$column]; ?></<?php echo $column; ?>>
    <?php } ?>
    </row>
    <?php } while ($row_rsProject =
    mysql_fetch_assoc($rsProject)); ?>
    <?php } // Show if recordset not empty ?>
    </root>
    <?php
    mysql_free_result($rsProject);
    ?>
    --------------------------------------------here is the
    source code to the projecct_detail page to display the
    content--------
    The projectID from the category page is being passed via a
    URL parameter. When I pull up the Spry Dataset in this page to
    display the nodes, this is the error I received (Unable to locate
    or parse the XML source (-1,-1). No nodes are being displayed.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"><!--
    InstanceBegin template="/Templates/temp.dwt.php"
    codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- InstanceEndEditable -->
    <link href="global.css" rel="stylesheet" type="text/css"
    />
    <!-- InstanceBeginEditable name="head" -->
    <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new
    Spry.Data.XMLDataSet("xml/detail.php><?php echo(
    isset($_GET['projectID'])?$_GET['projectID']:'' ); ?>", "row");
    //-->
    </script>
    <!-- InstanceEndEditable -->
    </head>
    <body class="oneColFixCtr">
    <div id="container"><!-- InstanceBeginEditable
    name="Main Content" -->
    <div id="mainContent">
    <h1> </h1>
    <p> </p>
    <!-- end #mainContent -->
    </div>
    <!-- InstanceEndEditable -->
    <div id="footer">
    <img src="images/banner.gif" width="500" height="66"
    alt="Plymouth Road Architects" />
    <br />
    <div id="nav">
    <table width="500" border="0" cellspacing="2"
    cellpadding="2">
    <tr>
    <td><div align="center"><a href="
    http://plymouthroadarchitects.com">HOME</a></div></td>
    <td><div align="center"><img
    src="images/bullet.gif" width="8" height="8"
    /></div></td>
    <td><div align="center"><a
    href="company_info.php">ABOUT/CONTACT
    US</a></div></td>
    <td><div align="center"><img
    src="images/bullet.gif" alt="" width="8" height="8"
    /></div></td>
    <td><div align="center"><a
    href="new_homes.php">NEW HOMES</a></div></td>
    <td><div align="center"><img
    src="images/bullet.gif" alt="" width="8" height="8"
    /></div></td>
    <td><div align="center"><a
    href="additions.php">ADDITIONS</a></div></td>
    <td><div align="center"><img
    src="images/bullet.gif" alt="" width="8" height="8"
    /></div></td>
    <td><div align="center"><a
    href="main_street.php">MAIN
    STREET</a></div></td>
    </tr>
    </table>
    </div>
    </div>
    <!-- end #container --></div>
    </body>
    <!-- InstanceEnd --></html>
    Sorry for all the confusion and not submitting this code to
    you earlier on this forum. I really do appreciate your feedback and
    assistance

  • Representing DB2 database with XML

    Hi All,
    I need to represent DB2 tables in the form of XML......say if i have some tables in DB2 with a certain relation ship...i need to map to XML(including the relation also)....how to do that?
    Thanks & Regards
    -vijay

    The DB2 XML Extender may be used represent database in XML.
    http://www-306.ibm.com/software/data/db2/extenders/xmlext/

  • Update Database Through XML file using SAP B1 business objects

    Hello everyone,
    I am facing a problem ie I am not able to update the Database(SQL 2000) through an XML file.
    Though i am able to insert the data in the databse using xml file but unable to update that data.
    The tables i want to update are OITM,ITM1,OITW. While i was trying to update  the Databse i was getting an error ie " -1107 Object's key is not set".
    I dont want to use DTW for importing or anything.
    Kindly help me out why i am facing this problem asap...

    Hi Pranay,
    My case was that I wanted to replicate an item from one company to another (I guess that's your case also). What I finally did is copy field by field the objects I needed. Later I've find out the solution given here,
    Copy items between databases
    but I haven't try it out. I expect your comments about it :).
    Regards,
    Ian

  • Option to choose : Storing values in database or xml

    Hi,
    I have one question. Which is the better way to store values
    1. To store in database tables
    2. To store in xml
    3. To store in xml & to store that xml as a field in database table
    I am always confused between these 3 options. I think when data is in hierarchical structure it should be stored in the xml. Please correct me if I am wrong. But what are the cons of storing xml in the database?
    Currently, I have one requirement where I have let's say 20 reports &
    some columns with name & ids in those reports. One column can be in
    multiple reports & one report contains multiple columns.
    Again there are other attributes of report like the categories for the report. These categories have ids & names and they can be part of multiple reports and one report can contain multiple categories.
    I think in this scenario, instead of going for xml for each report & parsing overhead I should create database structure as follows
    1. Report_master : To store report_id and report_name
    2. column_master: col_id col_name
    3. category_master: cat_id cat_name
    4. report_col_rel : report_id col_id
    5. report_category_rel : report_id cat_id
    Please let me know whether this is the right approach or I should create xml for each report & store it in report_master with the report_id and report_name.
    I will be grateful if you could help me to solve this confusion.
    Regards,
    Veena

    JoachimSauer wrote:
    mrkingdom75 wrote:
    First : You need a Database
    Second : You need ODBC source
    Third : Find how to use JDBC ODBC in javaNo! I strongly disagree with Second and Third.
    The JDBC ODBC bridge in Java is one of the worst JDBC drivers there is. Almost all type 4 JDBC drivers (i.e. pure Java drivers) are of a higher quality than that one.+1
    From the JDBC-ODBC documentation itself:
    >
    It is recommended that you obtain a commercial JDBC driver from a vendor such as your database vendor or your database middleware vendor. Check the list of drivers currently available.
    The JDBC-ODBC Bridge driver is recommended only for experimental use or when no other alternative is available.
    9.2 JDBC-ODBC Bridge
    If possible, use a Pure Java JDBC driver instead of the Bridge and an ODBC driver. This completely eliminates the client configuration required by ODBC. It also eliminates the potential that the Java VM could be corrupted by an error in the native code brought in by the Bridge (that is, the Bridge native library, the ODBC driver manager library, the ODBC driver library, and the database client library).
    The JDBC-ODBC Bridge driver is recommended for use in prototyping efforts and for cases where no other JDBC technology-based driver exists. If a commercial, all-Java JDBC driver is available, we recommend that it be used instead of the Bridge.

  • Create a Database from xml

    Hi,
    I'm using javaDb embedded and I trying to find the best way to create a database from a xml file.
    I managed to do this, previously with netbeans 6.9, jdk 6 and apache ddlutils.
    Unfortunately this method as proven to be not so good, and and can't get it to work with netbeans 7.
    Is there a best way to do this?? Any recommendation on this matter will be appreciated.
    Thanks in advance,
    Hugo

    s3c wrote:
    Hi,
    I'm using javaDb embedded and I trying to find the best way to create a database from a xml file.
    I managed to do this, previously with netbeans 6.9, jdk 6 and apache ddlutils.
    Unfortunately this method as proven to be not so good, and and can't get it to work with netbeans 7.
    Is there a best way to do this?? Any recommendation on this matter will be appreciated.
    Thanks in advance,
    Hugowhat does question or solution have to do with forum TOPIC Oracle RDBMS?

  • Database or xml

    Hello,
    I'm writing a program that stores pictures (architectural) and emails, letters,... belonging to certain projects. Is it usefull to store the information (place of the file, content of email,...) in xml pages or should i only use a database?
    Thanks Bert

    Those two are not complementary. You can't store anything in an xml page, because that is a standard not a storage medium.
    Perhaps you want to know if you should store your stuff in a file (using a xml format) or store it in the database (which could still be xml or something else.) If so then it depends on the database, the volume and what you intend to do with with it.
    Typically if the volume, bulk is high then the file system is better because the storage needs and management offset the costs of the impact on the database. If you are looking for a web/internet solution and the bulk is not so high then the database is a better solution.

  • Select data from database via XML

    I want to select data for display and insert data to tables via XML, and I want
    to do this from a browser.
    I am using "Oracle8i Enterprise Edition Release 8.1.7.4.0" on HP-UX server
    with "JServer Release 8.1.7.4.0.".
    The oracle documentation says I need the following in order to do this.
    1. XML-SQL Utility
    2. XML Parser for Java, V2
    3. JDBC driver
    4. JDK
    5. A Java compliant web server
    6. XSL Servlet
    How do I verify, if the above software list is available in my environment.
    What are all available within the database and what are other software I need to
    install.
    Thanks
    Pushparaj

    It's a classpath problem. Either you mistyped the class name, or you don't have the class in your classpath. I think Oracle's drivers come in db12.zip or db12.jar or some such. Whatever that jar or zip file is, it has to be in your classpath, but it's not.
    Or it is in your classpath, but you're in an appserver context where the classloader that the container provides for your app uses something other than the classpath variable. For instance, in tomcat, the jar file would be uder webapps/yourApplication/WEB-INF/lib I think.

  • Loading to database with XML Inbound Message

    We need to recibe XML invoices from suppliers using XML Gateway, we have a DTD and Message Map based on the XML structure defined by Treasury, when we process the XML using ECX_INBOUND  the Transaction Monitor shows the processing Status Success but no data is loaded to DB.
    The custum map is calling the action to insert into Database Table as a Post Process Activity on the Target database tables.
    we kindly asking for help because we have no idea what that is failing.

    I have encountered the same situation while following the example:
    Step by Step Guide to Creating an Inbound XML Gateway Transaction for Applications 11i [ID 329903.1]
    My inbound messages were received and en-queued, then they were de-queued, but now they just had "Pending" status in the transaction monitor. The post-process action does not occur at all.
    All the Workflow agent listeners are up and running. However, I do see an error in the log:
    Module: wf.plsql.WF_EVENT.GetSourceAgentGUID.Error
    Message Text: Specified source agent row does not exist in database. Setting to NULL.
    Any thoughts?
    ~Alan

  • Problem in saving the ½, ¼, ¾ values in database using xml

    Hi
    I am developing a java swing based application. In which I send data in xml format and save it on a online webstore through API calls.
    When I send the data in following format 3½, 3¼, 3¾. It saves only 3 not the whole value means It is ignoring the values ½, ¼, ¾.
    Here is my xml code which I am sending on network.
    <?xml version="1.0" encoding="UTF-16" standalone="yes"?>
    <product>  
        <product-type>Shirts</product-type>
        <title>testStyle</title>
        <variants type="array">
            <variant>
                <fullfilment-service>manual</fullfilment-service>
                <inventory-management>shopify</inventory-management>
                <inventory-policy>deny</inventory-policy>
                <option1>Black</option1>
                <option2>3¼</option2>
                <option3 nil="true"></option3>
                <price>40.0</price>
                <requires-shipping>true</requires-shipping>
                <sku>1307681713338</sku>
                <taxable>true</taxable>
            </variant>
            <variant>
                <fullfilment-service>manual</fullfilment-service>
                <inventory-management>shopify</inventory-management>
                <inventory-policy>deny</inventory-policy>
                <option1>Black</option1>
                <option2>3½</option2>
                <option3 nil="true"></option3>
                <price>40.0</price>
                <requires-shipping>true</requires-shipping>
                <sku>1307681714634</sku>
                <taxable>true</taxable>
            </variant>      
        </variants>  
    </product>In option2 tag I am passing ½, ¼, ¾.
    Please give me some solutions .
    Thanks
    Edited by: Sonal on 28-Jun-2011 22:28

    hi
    Thanks for your reply.
    I am using JAXB Parser for parsing. Here is my code.
              // Prepare for XML marshalling
              JAXBContext jaxbContext = JAXBContext.newInstance(ProductVariant.class);
              Marshaller marshaller = jaxbContext.createMarshaller();
              marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
              StringWriter stringWriter = new StringWriter();
            // Marshall product variant to XML
              marshaller.marshal(objProductVariant, stringWriter);
            // Prepare request content
              String entityString = stringWriter.toString();             
                    StringEntity entity = new StringEntity(entityString);
              entity.setContentType("application/xml");
              httpPost.setEntity(entity);                     
            // Execute API call
              HttpResponse response = httpClient.execute(httpPost);ProductVariant is a class name and objProductVariant is a name of object.
    When I check the entityString value, 3½ is present there but after saving it, when I check in database it store 3 only.

  • Extract data from database to xml ?

    is there any API, classes or tools ready to extract data from oracle database and generate xml files, Instead to implement a DOM class and build little by little the xml file??
    thanks for every info in advance.

    Yes, download the Oracle XML Development Kit from Oracle's website and look at the documentation of the XML-SQL Utility.

Maybe you are looking for

  • How to extract a csv registered in a BLOB column

    I've got a BLOB column where there is a CSV. How can I download the CSV? Oracle vers. 8i Thanks in advance!

  • A Possible Bug With Grouped Objects

    This is my problem: 1. I group a drawing or I create an object (movie clip, graphic, button...) 2. I double click the object/group on scene to edit. 3. I go in to the group. 4. I go back to the scene by double clicking somewhere empty. 5. And object

  • "Net use" not working in application that runs as "system"

    Hello, I am trying to create an application object to distribute a program which during the setup procedure creates two local users on the workstation. I tried to set up the application to run as an unsecure system user and start the setup.exe. This

  • I bought life on earth iBook and I can't download it? I have enough space

    I would like to know why I cannot download it I paid for it weeks ago and it still hasn't downloaded it just comes up with the loading sign and doesn't do anything and it won't let me select download because it already says downloading but it has Bee

  • Equium L300 PSLB2E - Which drivers do I install?

    Hi I just went through a file system breakdown and I'm trying to put the PC back to a working state. I don't have a system recovery disc at hand (I know I should, so don't lecture me about it I'm doing this as a favour for my mother in law, it's her