XSU updateXML problems

Hi,
I've a table, tab sequence, with the following structures:
Name Null? Type
TABLENAME NOT NULL VARCHAR2(50)
SEQUENCE_NO NUMBER(10)
I've generated an XML document, abc.xml, using the following code segments:
import oracle.jdbc.driver.*;
import oracle.xml.sql.query.OracleXMLQuery;
import java.lang.*;
import java.sql.*;
import java.io.*;
// class to test the String generation!
class testXMLSQL {
public static void main(String[] argv)
try{
// create the connection
Connection conn = getConnection("john","ajohn");
// Create the query class.
OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from tabsequence");
// Get the XML string
String str = qry.getXMLString();
// Print the XML output to screen
// System.out.println(" The XML output is:\n"+str);
writeToFile("abc.xml",str);
// Always close the query to get rid of any resources..
qry.close();
}catch(SQLException e){
System.out.println(e.toString());
// Get the connection given the user name and password..!
private static Connection getConnection(String username, String password)
throws SQLException
// register the JDBC driver..
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
// Create the connection using the OCI8 driver
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:@10.37.108.122:1220:lslva",username,password);
return conn;
private static void writeToFile(String fileName,String fileContent) {
try {
     FileOutputStream fo=new FileOutputStream(fileName);
     PrintStream ps=new PrintStream(fo);
     ps.println(fileContent);
     ps.close();
     fo.close();
catch(Exception ex){
     System.out.println(ex);
After I've made some modifications to the 'sequence_no' of the abc.xml,
I've attempted to execute the following code segment to update the
tabsequence table:
import java.sql.*;
import oracle.xml.sql.dml.OracleXMLSave;
import java.net.*;
public class testUpdate
public static void main(String argv[])
throws SQLException
String tabName = "tabsequence";
String fileName = "abc.xml";
Connection conn = getConnection("john","ajohn");
OracleXMLSave sav = new OracleXMLSave(conn, tabName);
String [] keyColNames = new String[1];
keyColNames[0] = "TABLENAME";
sav.setKeyColumnList(keyColNames);
String[] updateColNames = new String[2];
updateColNames[0] = "SEQUENCE_NO";
sav.setUpdateColumnList(updateColNames);
URL url = sav.getURL(fileName);
int rowCount = sav.updateXML(url);
sav.close();
System.out.println(" Successfully updated "+rowCount+ " rows into "+ tabName);
conn.close();
// Get the connection given the user name and password..!
private static Connection getConnection(String user, String passwd)
throws SQLException
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:@10.37.108.122:1220:lslva",user,passwd);
return conn;
It always gives me the following error message:
Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: NULL NOT A VALID COLUMN NAME.
at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2361)
at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2233)
at oracle.xml.sql.dml.OracleXMLSave.updateXML(OracleXMLSave.java:1595)
at testUpdate.main(testUpdate.java:26)
PLEASE HELP! THANKS

Hi,
I think there is a problem with the definition of the columns to be updated :
String[] updateColNames = new String[2];
updateColNames[0] = "SEQUENCE_NO";
sav.setUpdateColumnList(updateColNames);
You fill only the first element of the array, the second one is null!
Try
String[] updateColNames = new String[1];
instead...
However, I haven't tried it out!
HTH,
Bernhard

Similar Messages

  • Encoding in Java XSU internationalisation problem

    I have SUN Solaris 2.7, JDK 1.2, Oracle 8.0.5, Oracle XSU 1.2. When I use KOI8-R text encoding and set this in XSU then I see only signs "?????", but if I set ISO-8859-1 then it's Ok. I could work with ISO-8859-1, but in Oracle it stores bad text. Only latinian words was stored successful.

    A new user name?
    I can think of ways round your problem but can you first provide a reference that indicates that byte 0x80 is the MS936 encoding for the Euro?
    P.S. This is a forum and the vast majority of participants, including me, have no direct relationship with Oracle so getting definitive answers from Oracle via this forum is unlikely. If you think you have found a bug in 1.5 and/or 1.6, and I am not convinced you have, you need to report it via the bug database. If it is a bug then the response time for a fix is likely to be months rather than days.
    P.P.S No I can't explain why it works in 1.7!

  • XSU Insert Problem with ORA-00001

    Hi,
    I am writing an application which will extract a series of tables from a source database and then populate a target database.
    I am using the XSU utility to extract each table individually into its own physical XML file.
    The extraction goes well, but on some tables the population has a problem.
    During the population process, the OracleXMLSave utility throws an exception:
    Error in loadFile oracle.xml.sql.OracleXMLSQLException: Exception 'java.sql.SQLException:ORA-00001: unique constraint (MYDB.SYS_C001346) violated encountered during processing ROW element 97All prior XML row changes were rolled back. in the XML document.
    I know for a fact that there is no duplicate primary key entries in the physical xml file.
    I am using the XSU - XSU12_ver2_1_0_beta with JDBC2.0 (JDK1.3 and loadable into Oracle8.1.7
    Has anyone seen this?
    I am at a critical point in the project. Any help appreciated.
    Mario Andreoli
    ComponenTech.com
    [email protected]

    Hi,
    I am writing an application which will extract a series of tables from a source database and then populate a target database.
    I am using the XSU utility to extract each table individually into its own physical XML file.
    The extraction goes well, but on some tables the population has a problem.
    During the population process, the OracleXMLSave utility throws an exception:
    Error in loadFile oracle.xml.sql.OracleXMLSQLException: Exception 'java.sql.SQLException:ORA-00001: unique constraint (MYDB.SYS_C001346) violated encountered during processing ROW element 97All prior XML row changes were rolled back. in the XML document.
    I know for a fact that there is no duplicate primary key entries in the physical xml file.
    I am using the XSU - XSU12_ver2_1_0_beta with JDBC2.0 (JDK1.3 and loadable into Oracle8.1.7
    Has anyone seen this?
    I am at a critical point in the project. Any help appreciated.
    Mario Andreoli
    ComponenTech.com
    [email protected]

  • Xsu insert problem

    Hi,
    I'm using XDK 9.2.0.2.0 and oracle 9i JDBC driver. I'm trying to insert rows from an xml doc to oracle 8.1.7. I'm getting the following error
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/xdb/XMLType
    at samp10.main(samp10.java:31)
    Sample program used
    /** Simple example on using Oracle XMLSQL API; this class inserts the data from a XML document into the database*/
    import oracle.xml.sql.dml.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.jdbc.*;
    import java.net.*;
    public class samp10
    //========================================
    // main() - public static void
    public static void main(String args[]) throws SQLException
    String tabName = "VEERATST";          // table into which to insert
    String fileName = "samp10.xml";     // file name containing the xml doc
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //init a JDBC connection
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:@nysdsf02:1521:sfdev","sfss","sfss");
    OracleXMLSave sav = new OracleXMLSave(conn, tabName);
    System.out.println("Connection Established");
    URL url = sav.getURL(fileName);
    int rowCount = sav.insertXML(url);
    System.out.println(" successfully inserted "+rowCount+
              " rows into "+ tabName);
    conn.close();
    Can anyone help me
    Thanks

    I am using the XDK 9i Production release under Oracle 8.1.7

  • Problem with XSU and DataSources with nested cursors?

    We are having a problem with the xsu libraries (OracleXMLQuery) using nested cursor syntax. The class returns nicely nested xml document when a database connection is established in the traditional/legacy manner of "class.forName(); DriverManager.registerDriver();" .
    However, when using a DataSouce object within a J2EE container, we get an xml document back that only represents the main level of the resultset with datatypes + memory addresses for the cursor fields (instead of the expected nested xml elements).
    Any thoughts?
    BTW, we are using the iPlanet Application Server with an Oracle 9i database.
    for instance:
    SELECT a, b, CURSOR(select m, n, o
    from table2
    where table1.x = table2.y),
    d, e, f
    FROM table1
    WHERE table1.name = 'Matt'

    Somebody please answer this question?

  • Problems load XSU

    Whe tryign to load the XSU package into the DBMS I get the following error:
    <---------------------->
    C:\Oracle\OracleXSU12\lib>echo "Loading jar files..."
    "Loading jar files..."
    C:\Oracle\OracleXSU12\lib>echo "Loading xmlparser..."
    "Loading xmlparser..."
    C:\Oracle\OracleXSU12\lib>call loadjava -r -v -u "SSDR/IPT@ipt" xmlparserv2.jar
    initialization complete
    loading : oracle/xml/parser/v2/XSLResultElement
    creating : oracle/xml/parser/v2/XSLResultElement
    Error while creating class oracle/xml/parser/v2/XSLResultElement
    ORA-29516: Aurora assertion failure: Assertion failure at eox.c:187
    Uncaught exception Root of all Java exceptions:
    loading : oracle/xml/parser/v2/XSLCopy
    creating : oracle/xml/parser/v2/XSLCopy
    Error while creating class oracle/xml/parser/v2/XSLCopy
    ORA-29516: Aurora assertion failure: Assertion failure at eox.c:187
    Uncaught exception Root of all Java exceptions:
    loading : oracle/xml/parser/v2/XMLByteReader
    creating : oracle/xml/parser/v2/XMLByteReader
    <----------------->
    the initjvm.sql is performed wo errors
    null

    hi
    i am also doing the same..but the same worked for me....which version of xsu ur trying to install??
    i am working with xsu111
    my problem is something else...when i am trying to execute the SQL statement..i am getting a JVM error and Java is terminating the program
    any idea what might be the reason??
    aniket
    null

  • Problem inserting value in CLOB column from an XML file using XSU

    Hi,
    When I try to insert CLOB value into Oracle9i database from an XML document using XSU, I get an exception as below.
    09:37:32,392 ERROR [STDERR] oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: ORA-03237: Initial Extent of specified size cannot be allocated
    ORA-06512: at "SYS.DBMS_LOB", line 395
    ORA-06512: at line 1
    ' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    All Element tags in XML doc. is mapped to columns in the database. One of the table columns is CLOB. That is the one that gives the above exception. Here is the xml...
    ID - is autogenerated value.
    <?xml version="1.0" ?>
    <ROWSET>
    <ROW num="1">
    <ID></ID>
    <SEQ>
    GCATAGTTGTTATGAAGAAATGGAAGAAAAATGCACTCAAAGTTGGGCTGTCAGGCTGTCTGGGGCTGAATTCTGGTGTGACAGTGTGATGAAGCCATCTTTGAGCCTAAATTTGATAATGAGCCAGTCATGATCTGGTTGTGATTACTATAACAAGATTAAATCTGAATAAGAGAGCCACAACTTCTTTAAAGACAGATTGTCAAGTCATTACATGGAAGAGGGAGATTGCTCCTTTGTAAATCAGGCTGTCAGGCCAACTGAATGAAGGACGTCATTGTACAGTAACCTGATGAAGATCAGATCAACCGCTCACCTCGCCG
    </SEQ>
    </ROW>
    </ROWSET>
    Can anyone identify what's the problem.. and suggest a solution for this..?
    Thanks in advance..
    Viji

    Would you please specify the XDK verison and database version?

  • DBMS_XMLSAVE.updatexml basic problem - bug?

    I want to update a column that is also the key. i.e. \
    update salary_tab set salary=15000 where salary=10000
    how can I accomplish this using DBMS_XMLSAVE.UPDATEXML?
    Trying to figure out for 6 hours no solution :( help!
    Thanks in advance!

    Hi Pavan,
    Thanks for looking into it. However, this does not work - all the examples I found on the net dealt with different key and update columns. My case is when the key and update columns lists are overlapping.
    Thus,
    Key Column List = SALARY
    Update Column List = SALARY
    the problem is that I dont know how to specify the rowset xml now.
    <ROWSET>
    <ROW>
    <SALARY>10000</SALARY>
    <ROW>
    </ROWSET>
    how can I specify 2 nodes for salary - one to find which row to update and one to specify the new upated value.
    Is this a missing functionality in DBMS_XMLSAVE??

  • XSU - OracleXMLStaticSave - newContext -- problem

    Hi,
    I'm using XSU 1.2.1 with a JDBC thin driver and 8i db.
    Is there a way to make OracleXMLStaticSave use prepared connection since there is no constructor nor a member function for that?
    When I try to create the context using OracleXMLStaticSave.newContext, an exception, No suitable driver, is thrown after newContext call searches for a default connection.
    Which is the default connection and can I access it or is this the conn used by Java Stored Procedures?
    Can someone please comment on this..
    Thanx a lot.
    Ivan
    null

    Good morning.
    I am doing a SELECT which has 2 cursors and creating an xml document object, to which I apply an XSL stylesheet. I am not doing any inserts (so the problem is not related to data not being committed.) Also, remember that this works fine with 1.1.3 - I only have this problem with XSU 1.2. I was doing performance tests when I discovered that once the number of eligible header records exceeds 400, the program only picks up a portion of them. I could send you the XML query / SQL statement, but it's tough to past a large statement in this small space. Please let me know if there is some other (more practical) means by which I can show you the statement.
    Thanks!
    null

  • Problem with XSU when trying to execute pl/sql package returning ref cursor

    Hi,
    I'm exploring xsu with 8i database.
    I tried running sample program which I took from oracle
    documentation. Here is the details of these.
    ------create package returning ref cursor---
    CREATE OR REPLACE package testRef is
         Type empRef IS REF CURSOR;
         function testRefCur return empRef;
    End;
    CREATE OR REPLACE package body testRef is
    function testRefCur RETURN empREF is
    a empREF;
    begin
    OPEN a FOR select * from emp;
    return a;
    end;
    end;
    ---------package successfully created-----
    Now I use java program to generate xml data from ref cursor
    ------------java program ----------
    import org.w3c.dom.*;
    import oracle.xml.parser.v2.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    import java.io.*;
    public class REFCURt
    public static void main(String[] argv)
    throws SQLException
    String str = null;
    Connection conn = getConnection("scott","tiger"); //
    create connection
    // Create a ResultSet object by calling the PL/SQL function
    CallableStatement stmt =
    conn.prepareCall("begin ? := testRef.testRefCur();
    end;");
    stmt.registerOutParameter(1,OracleTypes.CURSOR); // set
    the define type
    stmt.execute(); // Execute the statement.
    ResultSet rset = (ResultSet)stmt.getObject(1); // Get the
    ResultSet
    OracleXMLQuery qry = new OracleXMLQuery(conn,rset); //
    prepare Query class
         try
    qry.setRaiseNoRowsException(true);
    qry.setRaiseException(true);
    qry.keepCursorState(true); // set options (keep the
    cursor alive..
         System.out.println("..before printing...");
    while ((str = qry.getXMLString())!= null)
    System.out.println(str);
         catch(oracle.xml.sql.OracleXMLSQLNoRowsException ex)
    System.out.println(" END OF OUTPUT ");
    qry.close(); // close the query..!
    // qry.close(); // close the query..!
    // Note since we supplied the statement and resultset,
    closing the
    // OracleXMLquery instance will not close these. We would
    need to
    // explicitly close this ourselves..!
    stmt.close();
    conn.close();
    // Get the connection given the user name and password..!
    private static Connection getConnection(String user, String
    passwd)
    throws SQLException
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@xxxx:1521:yyyy",user,passwd);
    return conn;
    when I ran the program after successful compilation,I got the
    following error
    ==========
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException:
    1
    at oracle.xml.sql.core.OracleXMLConvert.getXML(Compiled
    Code)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:263)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:217)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLString
    (OracleXMLQuery.java:194)
    at REFCURt.main(Compiled Code)
    ============================
    Can anybody tell me why I'm getting this error.Am I missing any
    settings?
    thanks

    We are using 8.1.7 Oracle db with latest xdk loaded.
    am I missing any settings?

  • Problem using insertXML with Reader  (XSU utility)

    I am having an issue with the insertXML method of OracleXMLSave class when using a java.io.Reader argument. The source xml stream contains a DOCTYPE declaration, which causes the following error when I run my process:
    XML-20112: (Fatal Error) Error opening external DTD './dtd/Devices.dtd'.
    oracle.xml.sql.OracleXMLSQLException: no protocol: ./dtd/Devices.dtd
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2383)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1373)
    Apparently the path to the DTD file cannot be resolved, even though there is an appropriate dtd file in the subdirectory as listed.
    If I use the other version of insertXML that takes a URL and load the same xml file from a file system, everything works fine.
    Outside of taking an interim step to remove the DOCTYPE declaration, is there any way to solve this problem?
    Any advice would be appreciated... thanks!

    Deepak;
    Thanks for the reply.
    Where would I make this specification?
    I am currently doing the following:
         try {
    Connection conn = getConnection();
    OracleXMLSave sav = new OracleXMLSave(conn, tableName);
    sav.setUpdateColumnList(colNames); // set the columns to update.
    sav.setRowTag(rowTag);
    sav.setIgnoreCase(true);
    // set xslt
    Reader xsltReader;
         try {
              xsltReader = new FileReader(new File("c:/attr2elem.xsl"));
              sav.setXSLT(xsltReader, null);
         } catch (FileNotFoundException e) {
              e.printStackTrace();
    sav.insertXML(xmlData);
    ... more code ...
    The xmlData is a stream that contains the dtd that is attempting to be referenced.
    How do I specify the DTD that is contained within that stream as a file URL?
    Regards,
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • XSU Problem:Error-- Cannot map Unicode to Oracle character

    Hi, I am using XSU to get the resultset from database(oracle 9.2.0.6.0) as XML.When I query data from some columns and get the XMLString, they give me error -"Cannot map Unicode to Oracle character". The database charset is "US7ASCII" .
    One column is storing Chinese with ''US7ASCII".When xmlString Result contianer
    the column,there is "oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode to Oracle character".But If xmlString Result don't container that column,it run very good.
    The program container these libs: ojdbc14.jar,xmlparserv2.jar,xdb.jar,nls_charset12.jar,xsu12.jar.
    The program code:
    public class OracleXmlParse {
    public static void main(String[] args) {
    try{
    DriverManagerDataSource dataSource = new DriverManagerDataSource("oracle.jdbc.driver.OracleDriver",
                        "jdbc:oracle:thin:@168.1.1.136:1521:imis","ims","ims");
    String selectSQL = "select AREA_CODE,AREA_NAME,REGION_CODE,AREA_NAME_CN from CDM_AREA";
    OracleXMLQuery query = new OracleXMLQuery(conn,selectSQL);
    query.setEncoding("UTF-8");
    String str = query.getXMLString();
    System.out.println(str);
    conn.close();
    }catch(SQLException e){
                   e.printStackTrace();
    Exception:
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode to Oracle character.
         at oracle.xml.sql.core.OracleXMLConvert.getXML(OracleXMLConvert.java:1015)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:267)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:221)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:198)
         at procedure.OracleXmlParse.main(OracleXmlParse.java:34)
    The column that store chinese is AREA_NAME_CN .When "selectSQL " is equal to "select AREA_CODE,AREA_NAME,REGION_CODE from CDM_AREA",the program is ok.
    Please help.
    Message was edited by:
    user542404
    Message was edited by:
    user542404

    So, What is the solution ? Is there something I can do in my code ? My program gives the exception and stops. I am not even interested to fetch the data, which are giving this error.

  • XML load using PL/SQL (XSU) problem with dtd file.

    Hi,
    I'm trying to load a xml file and receives this errormassage:
    SQL> exec loadxml;
    In Exception
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: Error opening external DTD
    'Businesscard.DTD'.
    Any idea what I can change? Below is the things I've done and also how the xml file looks
    and the dtd file.
    Regards
    Jorgen
    CREATE DIRECTORY XML_DIR AS 'C:\XML';
    CREATE TABLE XML_TEMP (key NUMBER, f_lob BFILE);
    INSERT INTO XML_TEMP VALUES (1,BFILENAME('XML_DIR','TeleAdressVKI0209021728.xml'));
    CREATE TABLE XML_DOC (
    Key1 VARCHAR2(32),
    Key2     VARCHAR2(32),
    Key3 VARCHAR2(32),
    Terminate     VARCHAR2(3),
    LegalName     VARCHAR2(420),
    PopName          VARCHAR2(420),
    StreetName     VARCHAR2(60),
    StreetNumber     VARCHAR2(10),
    PostNumber     VARCHAR2(10),
    PostAdress VARCHAR2(30),
    CordinateLevel     VARCHAR2(32),
    xCor          VARCHAR2(10),
    yCor VARCHAR2(10),
    PoiCategory VARCHAR2(32),
    Telephone VARCHAR2(30));
    CREATE OR REPLACE PROCEDURE loadxml AS
    fil BFILE;
    buffer RAW(32767);
    len INTEGER;
    insrow INTEGER;
    BEGIN
    SELECT f_lob INTO fil FROM xml_temp WHERE key = 1;
    DBMS_LOB.FILEOPEN(fil,DBMS_LOB.FILE_READONLY);
    len := DBMS_LOB.GETLENGTH(fil);
    DBMS_LOB.READ(fil,len,1,buffer);
    xmlgen.resetOptions;
    insrow := xmlgen.insertXML('xml_doc',UTL_RAW.CAST_TO_VARCHAR2(buffer));
    DBMS_OUTPUT.PUT_LINE(insrow);
    IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    DBMS_LOB.FILECLOSE(fil);
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('In Exception');
    DBMS_OUTPUT.PUT_LINE(SQLERRM(SQLCODE));
    IF DBMS_LOB.FILEISOPEN(fil) = 1 THEN
    DBMS_LOB.FILECLOSE(fil);
    END IF;
    end;
    The xml file look like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Cards SYSTEM 'Businesscard.DTD'>
    <Cards>
    <Comment>TeleAdress initial</Comment>
    <OldFile>xxxx</OldFile>
    <NewFile>xxxx</NewFile>
    <Card>
    <Key1>95352</Key1>
    <Key2>159651</Key2>
    <Key3>3807868</Key3>
    <Terminate>no</Terminate>
    <Cardholder>
    <LegalName>
    <Name>
    <Full>AXFOOD DIREKT AB</Full>
    </Name>
    </LegalName>
    <PopName>
    <Name>
    <Full>WILLYS LEGPRIS AB</Full>
    </Name>
    </PopName>
    </Cardholder>
    <Location>
    <Address>
    <StreetInfo>
    <StreetName>BAGARBYVDGEN</StreetName>
    <StreetNumber>61</StreetNumber>
    </StreetInfo>
    <ZipCode>19134</ZipCode>
    <City>SOLLENTUNA</City>
    <Coordinate>
    <Level>1</Level>
    <xCor>1620480</xCor>
    <yCor>6592717</yCor>
    </Coordinate>
    </Address>
    <Business>
    <POI>
    <POIId>46</POIId>
    <POIId>84</POIId>
    </POI>
    <InfoRow>
    <Subscriptions>
    <TelAddress>08 6234540</TelAddress>
    </Subscriptions>
    </InfoRow>
    </Business>
    </Location>
    </Card>
    <Card_Count>1</Card_Count>
    </Cards>
    the dtd file looks like this:
    <!-- BusinessCard.dtd -->
    <!-- History:          See end of this file -->
    <!-- Description:      This DTD is used for transferring business cards-->
    <!--               from TeleAdress Information AB to its customers. -->
    <!--===================== Root Element ===========================-->
    <!ELEMENT     Cards     (Comment,OldFile?,NewFile,Card*,Card_Count)>
         <!ELEMENT     Comment                         (#PCDATA)>
         <!ELEMENT     OldFile                         (#PCDATA)>
         <!ELEMENT     NewFile                         (#PCDATA)>
    <!--===================== Card ============================-->
    <!ELEMENT     Card     (Key1, Key2, Key3, Terminate, (RegNo?, Cardholder, Row*)?)>
         <!ELEMENT     Key1          (#PCDATA)>
         <!ELEMENT     Key2          (#PCDATA)>
         <!ELEMENT     Key3          (#PCDATA)>
         <!ELEMENT     Terminate     (#PCDATA)> <!-- Values can be yes or no-->
    <!--====================== Cardholder ============================-->
    <!ELEMENT     Cardholder     (RegNo, OrgType, LegalName, PopName?, Location)     >
         <!ELEMENT     RegNo          (#PCDATA)>
         <!ELEMENT     OrgType          (#PCDATA) >
    <!--====================== RegName ==================================-->
    <!ELEMENT     LegalName          (Name)>
    <!--====================== PopName ==================================-->
    <!ELEMENT     PopName          (Name+)>
    <!--====================== Location ==================================-->
    <!ELEMENT     Location          (Adress+, Unit*, Business)>
    <!--====================== Unit ==================================-->
    <!ELEMENT     Unit          (UnitNo, UnitName?, Status, HQ, SNI1?, SNI2?, SNI3?, WorkPlaceNo, WorkPlaceName?)>
         <!ELEMENT     UnitNo          (#PCDATA)>
         <!ELEMENT     UnitName     (#PCDATA)>
         <!ELEMENT     Status          (#PCDATA)>
         <!ELEMENT     HQ          (#PCDATA)> <!-- Values can be yes or no-->
         <!ELEMENT     SNI1          (#PCDATA)>
         <!ELEMENT     SNI2          (#PCDATA)>
         <!ELEMENT     SNI3          (#PCDATA)>
         <!ELEMENT     WorkPlaceNo     (#PCDATA)>
         <!ELEMENT     WorkPlaceName     (#PCDATA)>
    <!--====================== Business ==================================-->
    <!ELEMENT     Business          (POI?, InfoRow*)>
    <!--====================== POI =======================================-->
    <!ELEMENT     POI          (POIId+)>
         <!ELEMENT     POIId          (#PCDATA)>
    <!--====================== InfoRow ===================================-->
    <!ELEMENT     InfoRow          (Number,Heading*,Name?, Address?, Text?, HomePageAddresses?, EMailAddresses?, Subscriptions?)>
         <!ELEMENT     Number          (#PCDATA)>
    <!--====================== Heading =================================-->
    <!ELEMENT     Heading          (LevelNo, LevelName)>
         <!ELEMENT      LevelNo          (#PCDATA)>
         <!ELEMENT     LevelName     (#PCDATA)>
    <!--====================== Name =================================-->
    <!ELEMENT     Name          (Full,First?,Middle?,Last?)>
         <!ELEMENT      Full          (#PCDATA)>
         <!ELEMENT     First          (#PCDATA)>
         <!ELEMENT     Middle          (#PCDATA)>
         <!ELEMENT     Last          (#PCDATA)>
    <!--====================== Address ==============================-->
    <!ELEMENT     Address               (Type, StreetInfo?,TextBeforeZipCode?,ZipCode?,City?,AReg?,
                             Municipality?,County?,Country?,Coordinate?)>
         <!ELEMENT     Type               (#PCDATA)>     
         <!--====================== StreetInfo ==============================-->
         <!ELEMENT     StreetInfo          (PostBox?, StreetName?,StreetNumber?,Entrance?, CO?)>
              <!ELEMENT     PostBox               (#PCDATA)>
              <!ELEMENT     StreetName          (#PCDATA)>
              <!ELEMENT     StreetNumber          (#PCDATA)>
              <!ELEMENT     Entrance          (#PCDATA)>
              <!ELEMENT     Co               (#PCDATA)>
         <!ELEMENT     TextBeforeZipCode     (#PCDATA)>
         <!ELEMENT     ZipCode               (#PCDATA)>
         <!ELEMENT     City               (#PCDATA)>
         <!ELEMENT     AReg               (#PCDATA)>     
         <!ELEMENT     Municipality          (#PCDATA)>
         <!ELEMENT     County               (#PCDATA)>
         <!ELEMENT     Country               (#PCDATA)>
         <!--====================== Coordinate ==============================-->
         <!ELEMENT     Coordinate          (Level, xCor,yCor)>
              <!ELEMENT     Level          (#PCDATA)>
              <!ELEMENT     xCor          (#PCDATA)>
              <!ELEMENT     yCor          (#PCDATA)>
    <!--====================== Text =================================-->
    <!ELEMENT     Text          (InfoText+)>
         <!ELEMENT     InfoText          (#PCDATA)>     
    <!--====================== HomePageAddresses =================================-->
    <!ELEMENT     HomePageAddresses          (HomePage+)>
         <!ELEMENT     HomePage          (#PCDATA)>     
    <!--====================== EMailAddresses =================================-->
    <!ELEMENT     EMailAddresses          (EMail+)>
         <!ELEMENT     EMail          (#PCDATA)>     
    <!--======================= Subscriptions ===========================-->
    <!ELEMENT     Subscriptions     (ClassifiedCode?, Type, TelAddress, TextAfter?)     >
         <!ELEMENT     TelAddress     (#PCDATA)>
         <!ELEMENT     TextAfter     (#PCDATA)>
    <!ELEMENT     Card_Count               (#PCDATA)>
    <!--==============================================================-->
    <!-- History:          2002-06-06 created this file -->
    <!--                2002-07-04 Added Source on Coordinates -->
    <!--               2002-08-15 Changed Source to Level -->
    <!--               2002-08-15 Changed RegName to LegalName-->

    I've got the same problem,
    How to define the directory in witch the DTD is????
    We need something like DBMS_XMLSave.setdirectoryDTD, that doesn't exist.
    ben
    ERREUR ` la ligne 1 :
    ORA-29532: appel Java arrjti par une exception Java non interceptie :
    oracle.xml.sql.OracleXMLSQLException: Error opening external DTD
    'annoncesv22.dtd'.
    ORA-06512: ` "SDEV.SIMPORT", ligne 205
    ORA-06512: ` ligne 1

  • Problem using XSU with EJB

    Hello
    1) I have trouble when using the Oracle XML SQL Ulitity (XSU) with Enterprise Java Beans (EJB).
    This is due to that
    oracle.xml.sql.OracleXMLSQLException extends RuntimeException
    i.e. is interpreted by the EJB container as a system exception.
    (java.sql.SQLException extends Exception)
    2) Is there anywhere I can submit a change suggestion to the XSU developer team?
    Regards
    Ole

    Hello
    1) I have trouble when using the Oracle XML SQL Ulitity (XSU) with Enterprise Java Beans (EJB).
    This is due to that
    oracle.xml.sql.OracleXMLSQLException extends RuntimeException
    i.e. is interpreted by the EJB container as a system exception.
    (java.sql.SQLException extends Exception)
    2) Is there anywhere I can submit a change suggestion to the XSU developer team?
    Regards
    Ole

  • Updatexml function is returning error. Syntax problem....

    I have a xmlfile which is shown below...
    cat MYTEMP.xml
    <?xml version="1.0" encoding = "AL32UTF8"?>
    <ROWSET>
    <ROW>
    <EDETAIL>test</EDETAIL>
    <T1>3</T1>
    </ROW>
    <ROW>
    <EDETAIL> test1</EDETAIL>
    <T1>4</T1>
    </ROW>
    <ROW>
    <EDETAIL>test2 </EDETAIL>
    <T1>2</T1>
    </ROW>
    <ROW>
    <EDETAIL> </EDETAIL>
    <T1>1</T1>
    </ROW>
    <ROW>
    <EDETAIL> </EDETAIL>
    <T1>5</T1>
    </ROW>
    </ROWSET>
    I load this xmlfile into a xmltype column in a global temporary table.
    I have to update edetail tag to '~:' if it contains only whitespace(s) in it.
    I am trying the following command and its giving me error....
    insert into gt_xmltype_tab(xmlfile1)
    values(XMLType(bfilename('RESTOREDIR','MYTEMP.xml'),nls_charset_id('AL32UTF8')));
    update gt_xmltype_tab set xmlfile1 = updatexml(xmlfile1, '/ROWSET/ROW/EDETAIL/text()','~:')
    where extractvalue(xmlfile1, '/ROWSET/ROW/EDETAIL') IS NULL
    I get the following error for the updatexml...
    update gt_xmltype_tab set XMLFILE1 = updatexml(XMLFILE1 , '/ROWSET/ROW/EDETAIL/text()','~:')
    ERROR at line 1:
    ORA-19025: EXTRACTVALUE returns value of only one node
    What is the correct way of doing it? What am I doing wrong?

    What is the correct way of doing it? What am I doing wrong?The WHERE clause filters records from the table, not repeating elements from the XML document.
    Actually, I'm not sure if you want one or the other...
    If you've got multiple XML files in the table, and want to update (the table) only where there's something to update, then use existsNode in the WHERE clause to check if the XML possesses at least an "empty" element.
    If there's only one XML in the table, no WHERE clause necessary.
    As for the update (of the XML document), that's a little tricky.
    Once into the table, whitespaces are not preserved, so there's actually no text() node to update.
    A solution is to update the element as a whole :
    UPDATE gt_xmltype_tab
    SET xmlfile1 = updateXML( xmlfile1
                            , '/ROWSET/ROW/EDETAIL[not(text())]'
                            , XMLElement("EDETAIL", '~:') )
    ;

Maybe you are looking for

  • F9 / Ctrl-Enter not working in SQL Worksheet

    Win XP Pro, up to date patches, SQL Developer Help - About - Version Java(TM) Platform     1.6.0_11 Oracle IDE     3.0.04.34 Versioning Support     3.0.04.34 All of a sudden (yesterday morning) both F9 and Ctrl Enter have stopped working - I cannot o

  • When defining copy rules, only one source field allowed

    Our users have requested the facility to allow them to copy pricing condition records when in in VK12 transaction. But when configuring the copy rules, we have come across the following problem: When configuring copying rules for copying pricing cond

  • Help - Acrobat portfolios sometimes open wrong PDF

    My organization has been using Adobe Acrobat 10 (10.1.4) to compile PDFs into PDF portfolios.  We have noticed that, if we open several PDFs from the same portfolio, one after the other, that Acrobat eventually starts opening incorrect PDFs (i.e., no

  • HELP! my iphone 6 touchscreen is working bad

    i have 1 month with my iphone 6, and this day i have a problem, while im using the phone, the touchscreen works bad and start to do mistakes like start apps that i didn't touch and slide to UP, DOWN, RIGHT, LEFT... PLEASE HELP ME ! : (

  • Premiere pro cc having trouble with color corrected clips

    I've been working on a project for a few days and today when I opened premiere pro it gave me a warning about what software it had been running with and how it was no longer available. I'm sorry I've already forgotten the name of the software, but I