Inserting XML Code

Hi All,
Is it posible to insert XML RSS feed info into a Muse Page?
Regards
Nathan

As far as I tested this, I found that it will show a preview of the XML feed that you have entered in the box.
Suppose I add this XML code on my site:http://gauravr183.businesscatalyst.com/images/2013-08-26_1255.png
It will display the preview.
And in preview it did display the RSS channel feed image: http://gauravr183.businesscatalyst.com/images/2013-08-26_1257.png
Regards,
Gaurav Aggarwal

Similar Messages

  • Error inserting XML records 4000 bytes through Pro*C

    Hi,
    I am seeing the following error while trying to insert XML records > 4000 bytes (Records < 4000 bytes get inserted without any issues). Any help in resolving the issue would be highly appreciated.
    ORA return text: ORA-01461: can bind a LONG value only for insert into a LONG column.
    I am also able to insert records > 4000 bytes using the following query, But, I want to insert the records through a C application (using Pro*C) that is not running on the database server.
    INSERT INTO MY_XML_TABLE
    VALUES (XMLType(bfilename('XML_DIR', 'MY_FILE.XML'),
    nls_charset_id('AL32UTF8')));
    Oracle Version
    ===============
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Pro*C/C++ version:
    ====================
    Pro*C/C++ RELEASE 11.2.0.0.0 - PRODUCTION
    Schema registration:
    ====================
    begin
    DBMS_XMLSCHEMA.registerSchema (
    SCHEMAURL => 'MY_XML_SCHEMA.xsd',
    SCHEMADOC => bfilename ('ENG_REPORTS', 'MY_XML_SCHEMA.xsd'),
    GENTYPES => FALSE,
    OPTIONS => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
    CSID =>nls_charset_id ('AL32UTF8'));
    end;
    Table creation
    ===============
    CREATE TABLE MY_XML_TABLE (
    MY_XML_RECORD XmlType )
    XMLTYPE MY_XML_RECORD STORE AS BINARY XML
    XMLSCHEMA "MY_XML_SCHEMA.xsd" ELEMENT "MYXMLTAG" ;
    Record Insertion (Pro*C generated code):
    =========================================
    /* EXEC SQL FOR :l_sizeof_array_togo
    insert INTO MY_XML_TABLE
    (MY_XML_RECORD )
    VALUES( XMLTYPE(:l_XML_ptr INDICATOR :l_XML_indicators )); */
    struct sqlexd sqlstm;
    sqlstm.sqlvsn = 12;
    sqlstm.arrsiz = 1;
    sqlstm.sqladtp = &sqladt;
    sqlstm.sqltdsp = &sqltds;
    sqlstm.stmt = "insert into MY_XML_TABLE (MY_XML_RECORD) values (XMLTYPE(:s1\
    :s2 ))";
    sqlstm.iters = (unsigned int )l_sizeof_array_togo;
    sqlstm.offset = (unsigned int )20;
    sqlstm.cud = sqlcud0;
    sqlstm.sqlest = (unsigned char *)&sqlca;
    sqlstm.sqlety = (unsigned short)4352;
    sqlstm.occurs = (unsigned int )0;
    sqlstm.sqhstv[0] = (unsigned char *)&l_XML_ptr->xml_record;
    sqlstm.sqhstl[0] = (unsigned long )8002;
    sqlstm.sqhsts[0] = ( int )sizeof(struct xml_rec_definition);
    sqlstm.sqindv[0] = ( short *)&l_XML_indicators->XML_record_ind;
    sqlstm.sqinds[0] = ( int )sizeof(struct XML_indicator);
    sqlstm.sqharm[0] = (unsigned long )0;
    sqlstm.sqadto[0] = (unsigned short )0;
    sqlstm.sqtdso[0] = (unsigned short )0;
    sqlstm.sqphsv = sqlstm.sqhstv;
    sqlstm.sqphsl = sqlstm.sqhstl;
    sqlstm.sqphss = sqlstm.sqhsts;
    sqlstm.sqpind = sqlstm.sqindv;
    sqlstm.sqpins = sqlstm.sqinds;
    sqlstm.sqparm = sqlstm.sqharm;
    sqlstm.sqparc = sqlstm.sqharc;
    sqlstm.sqpadto = sqlstm.sqadto;
    sqlstm.sqptdso = sqlstm.sqtdso;
    sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);
    }

    After selecting data from xmltab table I just received first line of xmldata file. i.e
    <?xml version="1.0" encoding="WINDOWS-12 52"?> <BAROutboundXM L xmlns="http://BARO
    That must be a display issue.
    What client tool are you using, and what version?
    If SQL*Plus, you won't see the whole content unless you set some options :
    {code}
    SET LONG <value>
    SET LONGCHUNKSIZE <value>
    {code}
    Could you try the following?
    {code}
    SET LONG 10000
    SELECT t.object_value.getclobval() FROM xmltab t;
    -- to force pretty-printing :
    SELECT extract(t.object_value, '/*').getclobval() FROM xmltab t;
    {code}
    Edited by: odie_63 on 16 févr. 2011 08:58

  • Inserting xml data in a MYSQL database

    Hi,
    I would like to know how i can insert data from an xml file into a MYSQL database using a java program, I currently have a program which retrieves an xml record and i need to insert the information between the tags into a table in MYSQL..please help me out if anyone knows...i am not very familiar with java...thanks

    Hi there Sherkhan,
    Im trying to do exactly what ur doing, inserting xml data in to a mySQL database. Any chance u could share the code for this???
    Many thanks in advance.

  • LPX-00004 - Problems while inserting xml files in a xmltype column

    I've faced two problems while trying to insert xml files into my table containing a xmltype column:
    create table xml_test (id number(20),content xmltype)
    I use following java code for writing xml docs into db:
         conn.setAutoCommit(false);
         OraclePreparedStatement stmt = (OraclePreparedStatement)
              conn.prepareStatement("INSERT INTO xml_test (id,content) VALUES(?,?)");
         File file = new File(file1);
         InputStream in1 = new FileInputStream(file1);
         Reader r1 = new BufferedReader(new InputStreamReader(in1, "UTF-8"));
         int len = 0;
         StringBuffer text = new StringBuffer();
         while ((len = r1.read()) != -1) {
              text.append((char) len);
         in1.close();
         r1.close();
         XMLType poXML1 = XMLType.createXML(conn, text.toString());
         for (int i = 1; i <= 1; i++) {
              stmt.setInt(1, i);
              stmt.setObject(2, poXML1);
              stmt.execute();
         conn.commit();
    1. problem: occures only if a xml schema has been assoicated to the specific xmltype column. it seems that the length of a specific xml tag in the document is limited. but why?
    java.sql.SQLException: ORA-22814: attribute or element value is larger than specified in type
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at test.insertXML(test.java:84)
         at test.main(test.java:261)
    hier the xml-schema of the xmltype column "content":
    <?xml version="1.0" encoding="UTF-8"?>
    <!--W3C Schema generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xs:element name="AUTOR-ID" type="xs:string"/>
         <xs:element name="BODY" type="xs:string"/>
         <xs:element name="CONTENT">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="METADATEN"/>
                        <xs:element ref="BODY"/>
                   </xs:sequence>
                   <xs:attribute name="content-id" type="xs:string" use="required"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="DATUM" type="xs:string"/>
         <xs:element name="KEYWORD" type="xs:string"/>
         <xs:element name="METADATEN">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="DATUM"/>
                        <xs:element ref="TITEL" maxOccurs="unbounded"/>
                        <xs:element ref="KEYWORD" maxOccurs="unbounded"/>
                        <xs:element ref="AUTOR-ID"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="TITEL" type="xs:string"/>
    </xs:schema>
    2. problem: hier i have no idea what is happening ... please help
    java.sql.SQLException: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00004: internal error "MultiChar overflow"
    Error at line 61
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at test.insertXML(test.java:53)
         at test.main(test.java:259)

    It's hard for me to tell you more without seeing your instance data, but for problem #1, if you look at the underlying SQL types being generated by your schema, you will see that the default SQL mapping for a "string" in your schema is a VARCHAR2(4000) (and I believe this would be only 2000 for a varying width character set like UTF8).
    You can specify that you wish this column to be mapped as a CLOB in your schema if this is the problem. Also note that there is a 64K limit on the size of an individual node in XMLType.

  • Error while inserting XML data

    Hi,
    When I try to insert xml data, it gives the following error.
    --CREATE TABLE XMLTABLE OF XMLType;
    INSERT INTO XMLTABLE VALUES(XMLTYPE(getCLOBDocument('example.xml')));
    ORA-00600: internal error code, arguments: [qmxiUnpPacked2], [121], [], [], [], [], [], []
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    Any ideas?

    I've updated the FAQ with the answer to this one..
    XML DB FAQ

  • Insert XML data into oracle table

    I want to insert xml data returned by the VB code into oracle table.
    As a prequisite I have installed the XDK capabilities for Oracle by installing JServer & running
    SQL scripts catxsu.sql,xmlparserv2.jar,load.sql to load the XMLSQL Utility (DBMS_XMLQuery) into the database.
    I have also granted following privileges to the user.
    Grant users access to XMLParser and XMLDom packages:
         grant execute on xmldom to public;
         grant execute on xmlparser to public;
         create public synonym xmldom for sys.xmldom;
         create public synonym xmlparser for sys.xmlparser;
    But still i am not able to create procedure which will accept input parameter as an XML document coming from front end which in turn will insert that record into simple oracle table . I am using Oracle 8.1.7
    Thanks in advance

    Would you specify the database version?
    Since DBMS_XMLSave requires DOM, you normally need to divide the huge XML before insertion.

  • ORA-00600: inserting xml document

    I am getting an this error when inserting an xml document into Oracle.
    The schema below and sample xml document reproduce the problem.
    If I move the element named "theID" from the type "BaseObjectType"
    to "NextObjectType" and remove the extension declaration in this type
    all works ok. complete error is:
    ORA-00600: internal error code, arguments: [qmxConvUnkType], [], [], [], [],
    Schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema
    targetNamespace="http://www.x.com/test"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tes="http://www.x.com/test">
    <xs:complexType name="BaseObjectType" abstract="true">
    <xs:sequence>
    <xs:element name="theID" type="xs:string">
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="NextObjectType" abstract="true">
    <xs:complexContent>
    <xs:extension base="tes:BaseObjectType">
    <xs:sequence>
    <xs:element name="title" type="xs:string">
    </xs:element>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="RBaseType" abstract="true">
    <xs:complexContent>
    <xs:restriction base="tes:NextObjectType">
    <xs:sequence>
    <xs:element name="theID" type="xs:string"/>
    <xs:element name="title" type="xs:string"/>
    </xs:sequence>
    </xs:restriction>
    </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="RType">
    <xs:complexContent>
    <xs:extension base="tes:RBaseType">
    <xs:sequence>
    <xs:element name="theName" type="xs:string">
    </xs:element>     
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:element name="RObject" type="tes:RType"/>
    </xs:schema>
    Sample xml document:
    <?xml version="1.0" encoding="UTF-8"?>
    <RObject xmlns="http://www.x.com/test"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://localhost:8080:/test.xsd">
    <theID xmlns="">123</theID>
    <title xmlns="">title</title>
    <theName xmlns="">name</theName>
    </RObject>
    Register Schema call:
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'http://localhost:8080/test.xsd',
    SCHEMADOC => bfilename('TMP3','test.xsd'),
    LOCAL => TRUE,
    GENTYPES => TRUE,
    GENTABLES => TRUE,
    CSID => nls_charset_id('AL32UTF8'));
    END;
    Insert xml document call:
    insert into "RObject566_TAB" values
    (XMLType(bfilename('TMP3','test.xml'),nls_charset_id('AL32UTF8')));
    Changing NextObjectType to this gets insert to work:
    <xs:complexType name="NextObjectType" abstract="true">
    <xs:sequence>
    <xs:element name="theID" type="xs:string"/>
    <xs:element name="title" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    Anyone else seen this?
    jcl.

    BTW: This is with Oracle 10.2.0

  • Inserting XML in SQLServer

    Hi
    I need to insert XML documents into SQLServer, preferably using bulk load XML. That uses ADO, and it is a piece of cake to insert XML from a VBScript or ASP or something else supported by microsoft. But my documents will come from a java application, do I need to convert the java object (string probably) to an ADO or what do I do? I've the feeling I'm not looking at this the right way, so any help will be greatly appreciated.
    Thank you, Helena
    ps. I have the microsoft SQL 2000 JDBC driver ds
    pps Any useful code example would just cause me to explode with happiness =) d.s

    ok two things, do you need to insert the whole document, like using full-text indexing? That is prob not a good way to go about it. If so you are getting an object from the Java app or is Java app producing a file?
    Once you answer those it will help.
    What I would do, is set up my database so it has an attribute for each of my xml elements, and then i would parse my xml document and insert each of the elements into the corresponding attribute in the database, that would be the easiest thing to do. Then if you want to recreate the xml file just read it out and create the file.
    This may be way off, but it is what i would do, rather than store the whole doc...
    good luck, hope i helped
    RDE

  • Error when inserting xml with xsi:noNamespaceSchemaLocation

    Hello,
    Hopefully this isn't a stupid question....
    I am currently using Oracle 9.2.0.6.0 to try out XML.
    I haven't been able to get our DBAs to set up XML DB in its entirety so I just have the basics, i.e. I have access to the xmltype object but none of the packages like DBMS_SCHEMA and DBMS_XDB. Therefore, I haven't been able to register any schemas in the database.
    So what I'd like to know is why do I get an ORA-21700 error when I try to load an xml document which has the 'xsi:noNamespaceSchemaLocation' attribute'. If I take this out of the XML document, it loads.
    From my initial reading, I got the impression that registering a schema in order to validate documents was an optional, although probably an ideal, step to take.
    So another way of phrasing this subject might be: can one insert xml documents without the use of a schema?
    The example code is shown below.
    dbase> INSERT INTO MY_TABLE( id , message_type , status , rcvd_time, filename , xmlcol)
    2 VALUES ( 1, 0 , 'RECEIVED', sysdate , 'tempfilename' ,
    3 xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    4 xsi:noNamespaceSchemaLocation = "ExampleXML.xsd">
    5 <tag1>
    6 <tag2 attr1="something">Some data
    7 </tag2>
    8 </tag1>
    9 </ExampleXML>')
    10 );
    xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    ERROR at line 3:
    ORA-21700: object does not exist or is marked for delete
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    dbase> ed
    Wrote file afiedt.buf
    1 INSERT INTO MY_TABLE ( id , message_type , status , rcvd_time, filename , xmlcol)
    2 VALUES ( 1, 0 , 'RECEIVED', sysdate , 'tempfilename' ,
    3 xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    4 >
    5 <tag1>
    6 <tag2 attr1="something">Some data
    7 </tag2>
    8 </tag1>
    9 </ExampleXML>')
    10* )
    dbase> /
    1 row created.
    The xmlcol column was created simply as an xmltype column.

    Basically using XMLType without XML DB is almost impossible in 9.2.x. Please have the DBA's install XML DB by running the script $ORACLE_HOME/rdbms/admin/catqm.sql. They can follow the installing XDB instuctions in the XML DB Developer's guide.
    What is actually happening here is that the PARSER is hard wired to always check is a document that contains an noNamespaceSchemaLocation or schemaLocation tag is associated with an XML Schema that has been registered with Oracle XML DB. If is is, special action is takem, if it isn't then no special action is taken. Unfortunately for various arcane technical reasons if the the XDB repository is not present the check fails totally. Even if we fixed this bug, which has been marked not feasible to fix in the past, there are many other issues with the inbuilt XML technology having dependancies on the presence of the XML DB repository and XDB database user.
    So the net/net is don't use XMLType or any XML related features in 9.2.x or later unless XML DB is installed. It is extremenly likely at this point in time that XML DB will become a mandatory component of the next release of the database. At that point you will no longer have an option. It will be automatically installed when a database is created or updated and there will be no way of un-installing it.

  • ORA-01000 during inserting xml files

    Hello,
    I'm using the following jdbc-code to insert xml files into oracle 10gRelease2:
    PreparedStatement stmt = null;
    Connection conn = getConnection();
    try
    stmt = conn.prepareStatement("insert into security values (?)");
    } catch (Exception e) {
    System.err.println(e);
    BufferedInputStream bufferedInputStream;
    for (int i = 1; i < 500; i++)
    String docName = "../../../data/output/security/security" + i+ ".xml";
    try
    FileInputStream fileInputStream = new FileInputStream(docName);
    bufferedInputStream = new BufferedInputStream(fileInputStream, 5000);
    XMLType doc = null;
    doc = XMLType.createXML(conn, bufferedInputStream);
    stmt.setObject(1, doc);
    stmt.executeUpdate();
    doc.close();
    fileInputStream.close();
    } catch (Exception e) {
    System.out.println(i);
    System.err.println(e);
    conn.commit();
    The code is working fine when I insert less than 340 files. But when I try to insert more than 340 files I'm getting the error:
    java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    Where do I open so many cursors? During creating the XMLType?
    Thx,
    Fabian

    I can reproduce this. Looks like a problem with the XMLType.createXML() method. Will confirm and file a bug if necessary. In the mean time the following works and has the same effect
    package com.oracle.st.xmldb.pm.examples;
    import com.oracle.st.xmldb.pm.common.baseApp.BaseApplication;
    import java.io.ByteArrayInputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.Reader;
    import java.io.Writer;
    import java.sql.SQLException;
    import oracle.jdbc.OracleCallableStatement;
    import oracle.jdbc.OraclePreparedStatement;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.CLOB;
    import oracle.xdb.XMLType;
    public class BulkInsertXMLType extends BaseApplication
       public static String TABLE_NAME  = "Table";
       public static String SOURCE_FILE = "File";
       public static String ITERATIONS  = "Iterations";
       public void doSomething(String[] Args) throws Exception
          OracleCallableStatement  statement = null;
          String statementText;
          XMLType xml;
          CLOB    clob = CLOB.createTemporary( getConnection(), true, CLOB.DURATION_SESSION);
          // statementText = "insert into " + this.getSetting(this.TABLE_NAME) + " values(:1)";
          statementText = "insert into " + this.getSetting(this.TABLE_NAME) + " values(xmltype(:1))";
          System.out.println("GetXMLType.doSomething : Driver Type = " + this.getDriver() + ". Statement = " + statementText);
          statement = (OracleCallableStatement) getConnection().prepareCall(statementText);
          for (int i=0; i < Integer.parseInt(getSetting(this.ITERATIONS)); i++)
            try {
              InputStream is = new FileInputStream(getSetting(this.SOURCE_FILE));
              // xml = XMLType.createXML(this.getConnection(),is);            
              // statement.setObject(1,xml);
              InputStreamReader reader = new InputStreamReader( is );
              Writer writer = clob.setCharacterStream(0);
              char [] buffer = new char [ clob.getChunkSize() ];
              for( int charsRead = reader.read( buffer );
              charsRead > - 1;
              charsRead = reader.read( buffer ) )
                 writer.write( buffer, 0, charsRead );
              writer.close();
              reader.close();
              statement.setCLOB(1,clob);
              boolean result = statement.execute();
              is.close();
              clob.truncate(0);
            catch (SQLException sqle) {
                System.out.println("SQL Exception caught after " + i + "Iterations");
                System.out.println(sqle);
                throw sqle;
          CLOB.freeTemporary(clob);
          statement.close();
          getConnection().commit();
          getConnection().close();
      public static void main (String[] args)
        try
          BulkInsertXMLType example = new BulkInsertXMLType();
          example.initializeConnection();
          example.doSomething(args);
        catch (Exception e)
          e.printStackTrace();
    }

  • Inserting XML String into Table with help of Stored Proc

    I will be getting XML String from JAVA, which I have to insert in Table A, XML String is as follows
    <?xml version = '1.0'?>
    < TableA>
    <mappings Record="3">
    < MESSAGEID >1</ MESSAGEID >
    < MESSAGE >This  is available at your address!</ MESSAGE>
    </mappings>
    <mappings Record="3">
    < MESSAGEID >2</ MESSAGEID>
    < MESSAGE >This isn’t available at your address. </ MESSAGE>
    </mappings>
    </ TableA >
    Table Structure*
    MESSAGEID     VARCHAR2(15 BYTE)
    MESSAGE     VARCHAR2(500 BYTE)
    This is the stored procedure which I have written to insert data into TableA, V_MESSAGE will be input parameter for inserting XML String 
    create or replace procedure   AP_DBI_PS_MESSAGE_INSERT
    V_MESSAGE VARCHAR2(1024)
    AS
    declare
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    V_FILEHANDLE UTL_FILE.FILE_TYPE;
    begin
    -- the name of the table as specified in our DTD
    xmlgen.setRowsetTag('TableA');
    -- the name of the data set as specified in our DTD
    xmlgen.setRowTag('mappings');
    -- for getting the output on the screen
    dbms_output.enable(1000000);
    -- open the XML document in read only mode
    v_FileHandle := utl_file.fopen(V_MESSAGE);
    --v_FileHandle := V_MESSAGE;
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    -- for inserting the XML data into the table
    rowsp := xmlgen.insertXML('ONE.TableA',finalStr);
    dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
    xmlgen.resetOptions;
    end;Please Help
    Edited by: 846857 on Jul 18, 2011 10:55 PM

    with t as (select xmltype('<TableA >
                               <mappings Record="3">
                               <MessageId>1</MessageId>
                               <Message> This bundle is available at your address!</Message>
                               </mappings>
                               <mappings Record="3">
                               <MessageId>2</MessageId>
                               <Message>This isn’t available at your address. </Message>
                               </mappings>
                               </TableA  >') col FROM dual)
      --End Of sample data creation with subquery factoring.
      --You can use the query from here with your table and column name.
    select EXTRACTVALUE(X1.column_value,'/mappings/MessageId') MESSAGEID
          ,EXTRACTVALUE(X1.column_value,'/mappings/Message') MESSAGE
    from t,table(XMLSEQUENCE(extract(t.COL,'/TableA/mappings'))) X1;Above Code works as i get result
    MESSAGEID     MESSAGE
    1             This bundle is available at your address!
    2             This isn’t available at your address.
    _____________________________________________ now I want to insert the result into Table A... How to proceed... Please help
    Edited by: 846857 on Jul 19, 2011 12:15 AM

  • Any jdbc examples inserting XML doc

    Newbie to xmldb/jdbc/java
    I'm looking for some sample java code that uses jdbc to insert xml docs into the 10g xml db.
    Also looking for sample code that does xquery using JDBC on 10g xmldb.
    (using eclipse on windows)
    any help appreciated

    Does this help, assume that you have an instance of
    public XMLType makeXMLType(OracleConnection conn,Document xmlDocument)
    throws NamingException
    try {
    XMLType xml = null;
    if (xmlDocument != null)
    xml = XMLType.createXML(conn,xmlDocument);
    return xml;
    catch (SQLException sqle)
    NamingException ne = new NamingException(SQLCache.UNEXPECTED_SQL_EXCEPTION);
    ne.setRootCause(sqle);
    throw ne;
    You can then bind the XMLType to an insert statement using setObject.

  • How get and edit xml code of BI Publisher Report

    Hi to all,
    I need to do some costumization to one BI Publisher report. Investigating I found a solution to do my costumization. However this requieres edit the xml code. Can you please let me know how can I get and edit this code?
    Thanks in advance
    regards
    Daniel

    obiee / ebs .... ?
    Investigating I found a solution to do my costumization. However this requieres edit the xml code.
    no need edit seeded code (it's for SR)
    your steps:
    - get seeded code
    - edit
    - create custom report
    Can you please let me know how can I get and edit this code?
    for ebs you can look xml publisher responsibility, find by code

  • Steps to insert xml data into oracle

    Please give me next steps to insert xml data into oracle 9i:
    i've been doing this steps :
    1. create folder in oracle port:8080
    2. copy xsd into folder
    3. register schema
    4. Give me next step...
    5.
    6.
    Thanks

    this is my complete xmlschema
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
         <xs:element name = "A3A8Vers" type = "xs:string"/>
         <xs:element name = "F1F5Vers" type = "xs:string">
         </xs:element>
         <xs:element name = "sequence" type = "xs:string">
         </xs:element>
         <xs:element name = "amf" type = "xs:string">
         </xs:element>
         <xs:element name = "trnsKeyNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "mac" type = "xs:string">
         </xs:element>
         <xs:element name = "encryptionKey" type = "xs:string">
         </xs:element>
         <xs:element name = "signature" type = "xs:string">
         </xs:element>
         <xs:element name = "signer">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "entityNumber"/>
                        <xs:element ref = "keyNumber"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "entityNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "keyNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "pblKey">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "entityNumber"/>
                        <xs:element ref = "entityRole"/>
                        <xs:element ref = "keyNumber"/>
                        <xs:element ref = "publicKeyVal"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "ntrTime" type = "xs:string">
         </xs:element>
         <xs:element name = "deActionTime" type = "xs:string">
         </xs:element>
         <xs:element name = "actionTime" type = "xs:string">
         </xs:element>
         <xs:element name = "entityRole">
              <xs:complexType>
                   <xs:attribute name = "role" default = "INVALID">
                        <xs:simpleType>
                             <xs:restriction base = "xs:NMTOKEN">
                                  <xs:enumeration value = "TKD"/>
                                  <xs:enumeration value = "SKD"/>
                                  <xs:enumeration value = "INVALID"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:attribute>
              </xs:complexType>
         </xs:element>
         <xs:element name = "publicKeyVal">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "exponent"/>
                        <xs:element ref = "mod"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "exponent" type = "xs:string">
         </xs:element>
         <xs:element name = "mod" type = "xs:string">
         </xs:element>
         <xs:element name = "encriptionTransKey" type = "xs:string">
         </xs:element>
         <xs:element name = "keyType" type = "xs:string">
         </xs:element>
    </xs:schema>.
    I use command to create table :
    create table elements of xmltype
    xmlschema "http://192.168.1.1:8080/test.xsd"
    element "publicKey"
    . But why the result,table as object type. so i cant use command "desc <table_name>;"

  • Query in ASWE XML code doesn't return data

    Hello, since people on the Oracle Metalink site are to lazy to give an answer to this question. I'll try it via this forum. Here we go:
    I'm developing wireless applications running on Oracle9i Application Server Wireless Edition. I'v tried to implement the employee sample from Oracle Online Mobile Studio (studio.oraclemobile.com). The sample name is employee.jsp. This sample combines XML code with JSP.
    (code at the end of the text)
    When I test the sample I get no query results.
    When you take the first option for example, (search by dept number) the query result will not be displayed. I think it has something to do with the "executeQuery" line.
    rset = stmt.executeQuery("select * from EMP where EMPNO='" + empNum + "'");
    After giving the following input (employeenumber) 7369 (which excists in the
    database). I get the following errors:
    The panama server log returns the following error:
    1/14/02 5:19:28 PM NOTIFY : [Thread-13]
    core.XSLTransformerImpl.getXSLProc(XSLTransformerImpl.java:120)
    Create 10 number of XSL-processor for TINY_HTML
    1/14/02 5:19:35 PM NOTIFY : [Thread-15]
    adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL = http://host/portal/test/employee.jsp
    1/14/02 5:19:37 PM NOTIFY : [Thread-17] adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL =http://host/portal/test/employee.jsp?choice=empNum
    1/14/02 5:19:49 PM NOTIFY : [Thread-19]adapter.URLAdapter.invoke(URLAdapter.java:240)
    URL =http://host/portal/test/employee.jsp?&empNum=7369
    1/14/02 5:19:50 PM ERROR : [Thread-19]rt.common.Controller.reportServiceInvocationError(Controller.java:707)
    Service Invocation Error: Stream closed.
    The jserv.log returns the following error:
    [14/01/2002 17:19:50:431 CET] Invalid column name
    java.sql.SQLException: Invalid column name
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:4383)
    at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:667)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1374)
    at portal.test._employee._jspService(_employee.java:201)
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java)
    at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java)
    at oracle.jsp.JspServlet.internalService(JspServlet.java)
    at oracle.jsp.JspServlet.service(JspServlet.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:402)
    at org.apache.jserv.JServConnection.run(JServConnection.java:260)
    at java.lang.Thread.run(Thread.java:479)
    Does this have something to do with the encoding of the query result in the select statement? As you can see the variable is in the requeststring (URL = http://host/portal/test/employee.jsp?&empNum=7369)
    My database connection works fine (I've also tested the query using SQL plus and the SQL adapter also works).
    Is this the right statement?: ("select * from EMP where EMPNO='" + empNum + "'");
    I can not do anything with the error in the jserv.log (java.sql.SQLException: Invalid column name).
    The columnname EMPNO excists in the example table. The query in SQL plus gives a result.
    Can someone give my any suggestions?
    Thanks in advance.
    Thomas Wesseling, UCC
    ### Code of employee.jsp ###
    <?xml version="1.0" encoding="UTF-8"?>
    <SimpleResult>
    <SimpleContainer>
    <%@ page language="java" import="java.sql.*, java.util.*, java.text.* "%>
    <%
    //URL variables
    String choice = request.getParameter("choice");
    String empNum = request.getParameter("empNum");
    String lastName = request.getParameter("lastName");
    String jobTitle = request.getParameter("jobTitle");
    String deptNum = request.getParameter("deptNum");
    String notFoundMsg = null; //String for containing varying not found msg
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@172.16.0.51:1521:ora816", "scott", "tiger");
    Statement stmt = conn.createStatement();
    ResultSet rset = null;
    //**** Start of service - first card ****
    if (choice==null && empNum==null && lastName==null &&
    jobTitle==null && deptNum==null)
    %>
    <SimpleMenu title="Employee Search by:">
    <SimpleMenuItem target="employee.jsp?choice=empNum">Employee Number</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=lastName">Name</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=jobTitle">Job Title</SimpleMenuItem>
    <SimpleMenuItem target="employee.jsp?choice=deptNum">Dept Number</SimpleMenuItem>
    </SimpleMenu>
    <%
    //**** SECOND CARD - which search criteria ****
    if (choice!=null)
    if (choice.equals("empNum") && empNum == null)
    %>
    <!-- show search by employee number -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="empNum" format="*N">Enter Employee Number: </SimpleFormItem>
    </SimpleForm>
    <%
    else if (choice.equals("lastName") && lastName == null)
    %>
    <!-- show search by last name -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="lastName" format="*A">Enter Last Name: </SimpleFormItem>
    </SimpleForm>
    <%
    else if (choice.equals("jobTitle") && jobTitle == null)
    %>
    <!-- show search by job title -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormSelect name="jobTitle" title="Enter Job Title:">
    <SimpleFormOption value="CLERK">Clerk</SimpleFormOption>
    <SimpleFormOption value="SALESMAN">Salesman</SimpleFormOption>
    <SimpleFormOption value="MANAGER">Manager</SimpleFormOption>
    <SimpleFormOption value="ANALYST">Analyst</SimpleFormOption>
    <SimpleFormOption value="PRESIDENT">President</SimpleFormOption>
    </SimpleFormSelect>
    </SimpleForm>
    <%
    else if (choice.equals("deptNum") && deptNum == null)
    %>
    <!-- show search by dept number -->
    <SimpleForm target="employee.jsp?">
    <SimpleFormItem name="deptNum" format="*N">Enter Dept Number: </SimpleFormItem>
    </SimpleForm>
    <%
    //**** THIRD CARD - query DB based on criteria ****
    //**** empNum entered as search criteria ****
    if (empNum != null) //empNum is entered as search criteria- NEED TO TEST FOR NON-int
    rset = stmt.executeQuery("select * from EMP where EMPNO='" + empNum + "'");
    if (rset.next()) //if rset returns data, show data
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next() is true
    else
    notFoundMsg = "Employee Number " + empNum + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if empNum != null
    //**** lastName as search criteria ****
    else if (lastName != null)
    rset = stmt.executeQuery("select * from EMP where ENAME='" + lastName + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next is true
    else
    notFoundMsg = "Name " + lastName + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if lastName != null
    //**** jobTitle as search criteria ****
    else if (jobTitle != null)
    rset = stmt.executeQuery("select * from EMP where JOB='" + jobTitle + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    } //end rset.next is true
    else
    notFoundMsg = "Job Title " + jobTitle + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if jobTitle != null
    //**** deptNum as search criteria ****
    else if (deptNum != null) //deptNum is entered as search criteria
    rset = stmt.executeQuery("select * from EMP where DEPTNO='" + deptNum + "'");
    if (rset.next())
    do {
    %>
    <%@ include file="showResult.jsp" %>
    <%
    } while (rset.next());
    else
    notFoundMsg = "Dept Number " + deptNum + " Not Found";
    %>
    <%@ include file="notFound.jsp" %>
    <% }
    } //end if deptNum != null
    conn.close();
    %>
    </SimpleContainer>
    </SimpleResult>
    ### Code of NotFound.jsp ###
    <SimpleText>
    <SimpleTextItem><%=notFoundMsg%></SimpleTextItem>
    <Action label="Search" type="ACCEPT" task="GO" target="employee.jsp?"></Action>
    </SimpleText>
    ### Code of ShowResult.jsp ###
    <%
    //format date from query
    java.sql.Date date = rset.getDate("HIREDATE");
    String hireDate = DateFormat.getDateInstance(DateFormat.MEDIUM).format(date);
    %>
    <SimpleText>
    <SimpleTextItem>Emp#: <%=rset.getString("EMPNO")%></SimpleTextItem>
    <SimpleTextItem>Name: <%=rset.getString("ENAME")%></SimpleTextItem>
    <SimpleTextItem>Job: <%=rset.getString("JOB")%></SimpleTextItem>
    <SimpleTextItem>Manager: <%=rset.getString("MGR")%></SimpleTextItem>
    <SimpleTextItem>Hire Date: <%=hireDate %></SimpleTextItem>
    <SimpleTextItem>Salary: <%=rset.getString("SAL")%></SimpleTextItem>
    <SimpleTextItem>Commission: <%=rset.getString("COMM")%></SimpleTextItem>
    <SimpleTextItem>Dept#: <%=rset.getString("DEPTNO")%></SimpleTextItem>
    <SimpleTextItem>Email: <%=rset.getString("EMAIL")%></SimpleTextItem>
    <SimpleTextItem>Phone: <%=rset.getString("PHONE")%></SimpleTextItem>
    <Action label="Search" type="SOFT1" task="GO" target="employee.jsp"></Action>
    <Action label="Call" type="OPTIONS" task="CALL" number="<%=rset.getString("PHONE")%>"></Action>
    </SimpleText>

    Is EMPNO really a string field and not a numeric field? Your query is like
    ... where EMPNO='1949'
    and should it perhaps be
    ... where EMPNO=1949
    ?

Maybe you are looking for