Cannot display complete document in binary XML XMLType column

I've been trying to get a query to work that will display the complete XML document stored in a column of XMLType, binary XML storage.
<b/>
I"m using Toad 10.6.1.3.
<b/>
I'm running Oracle client:
{code}Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production{code}
<b/>
The table is defined:
{code}CREATE TABLE AUDITED_EVENT_XML_MIN (
AUDITED_EVENT_XML_PK_ID NUMBER(10) PRIMARY KEY,
/* The time the audit record was created. */
CREATED_TIME TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL,
/* Well-formed XML message */
XML_EVENT_CONTENT XMLType
XMLTYPE COLUMN "XML_EVENT_CONTENT" STORE AS BINARY XML;
{code}
<b/>
The XML has no namespace. The SQL that I tried is:
{code}select e.xml_event_content.extract('/') from AUDITED_EVENT_XML e;{code}
<b/>
I also tried a simpler approach.
{code}select * from AUDITED_EVENT_XML e;{code}
<b/>
and got this error:
{code}ORA-21500: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]{code}
<b/>
I'm a newbie; I'm sure there is a simple way to do this; but I can't find it in the Oracle XML DB Developers Guide.
It would also be helpful to know how to do this for documents that have a declared namespace (without a xsd schema)...
Thanks in advance...
Edited by: flyeagle5683 on Sep 4, 2012 3:18 PM

When ran from the Command window in PL/SQL Developer
Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
SQL>
SQL> CREATE TABLE AUDITED_EVENT_XML_MIN (
  2      AUDITED_EVENT_XML_PK_ID NUMBER(10) PRIMARY KEY,
  3      /* The time the audit record was created. */
  4      CREATED_TIME TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL,
  5      /* Well-formed XML message */
  6      XML_EVENT_CONTENT XMLType
  7      )
  8      XMLTYPE COLUMN "XML_EVENT_CONTENT" STORE AS BINARY XML;
Table created
SQL> insert into audited_event_xml_min values (1, systimestamp, xmltype('<root><child1>Val1</child1></root>'));
1 row inserted
SQL> commit;
Commit complete
SQL> select * from AUDITED_EVENT_XML_MIN e;
AUDITED_EVENT_XML_PK_ID CREATED_TIME                                      XML_EVENT_CONTENT
                      1 05-SEP-12 09.24.36.546435 AM                      <root>
                                                                            <child1>Val1</child1>
                                                                          </root>
SQL> select e.xml_event_content.extract('/') from AUDITED_EVENT_XML_MIN e;
E.XML_EVENT_CONTENT.EXTRACT('/
<root>
  <child1>Val1</child1>
</root>
SQL> I also ran the two SELECT statements from SQL*Plus, (11.2.0.3 32-bit Instant Client) and received the exact same results.
I'm guessing your version of Toad (or something between it and the DB) does not like XMLType data types being returned.
Try
select e.xml_event_content.extract('/').getStringVal() from AUDITED_EVENT_XML_MIN e;or .getClobVal() if the XML is large and see what happens.

Similar Messages

  • How to use adifferent Show form to display a document created by XML forms

    Hi,
    I have created some XML documents using an XML form.
    The XML form contains two Show forms, Show & Show2. The default is Show. When I view the XML document via a KM Docs iView the default Show form is used to display the resource.
    If I wish to display the XML document using a KM Docs iView, but using the Show2 (non-default) form how is this done?
    I have created Layout Sets for each of the different ways to display the XML forms, but there is no option to choose Layout Set in the KM Docs iView config.
    Thanks,
      Tom
    Edited by: Tom Parle on Apr 3, 2008 12:45 PM

    Hi Tom,
    Check out the SAP Help site [Linking Your Own List Forms into iViews|http://help.sap.com/saphelp_nw04s/helpdata/en/0e/1affa0f8c47447a164998b60025aea/frameset.htm]
    I think it explains exactly what you are looking for.
    Hope it helps,
    Robert

  • Read xml-structure from a xml-document stored in a xmltype-column?

    Hello,
    I have several xml-documents stored in a table with a xmltype-column.
    Is it possible to read the structure of one xml-document? I need to know what data are exists in the xml-documents.
    I had read some hours here, but I dont find a suitable solution for that.
    To make a example, what I need:
    I have stored the following xml-document in the table:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="6">
    <EMPLOYEE_ID>105</EMPLOYEE_ID>
    <FIRST_NAME>David</FIRST_NAME>
    <LAST_NAME>Austin</LAST_NAME>
    <EMAIL>DAUSTIN</EMAIL>
    <PHONE_NUMBER>590.423.4569</PHONE_NUMBER>
    <HIRE_DATE>6/25/1997 0:0:0</HIRE_DATE>
    <JOB_ID>IT_PROG</JOB_ID>
    <SALARY>4800</SALARY>
    <MANAGER_ID>103</MANAGER_ID>
    <DEPARTMENT_ID>60</DEPARTMENT_ID>
    </ROW>
    </ROWSET>
    I need to return the following:
    ROWSET
    ...ROW
    ......EMPLOYEE NUMBER
    ......FIRST_NAME VARCHAR2
    ......DEPARTMENT_ID NUMBER
    Regards,
    Mark

    Hi,
    I was on a wrong way. The datatype is not stored in xml, this was a mistake from me.
    I needed something to printout some values from a xml-file. This xml-file was generated bei MS Excel. The data are in /Workbook/Worksheet/Table/Cell and I didnt know how to access it.
    I write for that the following:
    DECLARE
    v_xml XMLType;
    v_doc dbms_xmldom.DOMDocument;
    v_node dbms_xmldom.DOMNode;
    type t_values is table of varchar2(2000) index by binary_integer;
    v_values t_values;
    type t_table is table of t_values index by binary_integer;
    v_table t_table;
    procedure node_output (v_node in out dbms_xmldom.DOMNode)
    is
    v_nodelist1 DBMS_XMLDOM.DOMNodeList;
    v_nodelist2 DBMS_XMLDOM.DOMNodeList;
    v_anzahlnodes number;
    v_anzahlrows number;
    v_node_c dbms_xmldom.DOMNode;
    v_xmlmitarbeiterid number;
    begin
    v_nodelist1 := dbms_xmldom.GETCHILDNODES(v_node);
    v_anzahlrows := DBMS_XMLDOM.GETLENGTH(v_nodelist1);
    if v_anzahlrows = 0 or DBMS_XMLDOM.GETNODENAME(v_node) = 'Table'
    then
    if v_anzahlrows > 0
    then
    for i1 in 0..v_anzahlrows - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist1,i1);
    v_nodelist2 := dbms_xmldom.GETCHILDNODES(v_node);
    v_anzahlnodes := DBMS_XMLDOM.GETLENGTH(v_nodelist2);
    for i2 in 0..v_anzahlnodes - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist2,i2);
    v_node_c := dbms_xmldom.GETFIRSTCHILD(v_node);
    v_node_c := dbms_xmldom.GETFIRSTCHILD(v_node_c);
    v_values(i2) := DBMS_XMLDOM.GETNODEVALUE(v_node_c);
    end loop;
    v_table(i1) := v_values;
    end loop;
    for i1 in 1..v_anzahlrows - 1
    loop
    select SEQ_XMLMITARBEITER.nextval into v_xmlmitarbeiterid from dual;
    for i2 in 1..v_table(i1).count - 1
    loop
    dbms_output.put_line(v_table(i1)(i2));
    end loop;
    end loop;
    end if;
    else
    v_node := dbms_xmldom.GETFIRSTCHILD(v_node);
    for i in 0..v_anzahlrows - 1
    loop
    v_node := dbms_xmldom.Item(v_nodelist1,i);
    node_output(v_node);
    end loop;
    end if;
    end;
    BEGIN
    select inhalt into v_xml FROM xmlimport WHERE name = 'F23973/mitarbeiter.xml';
    v_doc := dbms_xmldom.newDOMDocument(v_xml);
    v_node:= dbms_xmldom.makeNode(dbms_xmldom.getDocumentElement(v_doc));
    node_output(v_node);
    END;
    This gives me all data from a xml-Excel-file. Is there a better way to do that? I have Oracle 10.2.
    Regards,
    Mark

  • Case Statement into XML , XMLType column

    We are storing following(example) xml into xmltype column (column name xmlfile , table name xml_table) .
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <context id="reporting_options">
          <scenario>
             <abc:isAllow>false</abc:isAllow>
          </scenario>
       </context>
       <abc:tab1 contextRef="con1">89841</abc:tab1>
       <abc:tab1 contextRef="con2">-18514</abc:tab1>
       <abc:tab2 contextRef="con1">89841</abc:tab2>
       <abc:tab2 contextRef="con2">-18514</abc:tab2>
       <abc:tab3 contextRef="con1">By Current/Non-Current Classification</abc:tab3>
       <abc:tab3 contextRef="con2">0</abc:tab3>
    </xml>I want to extract the values for tab1 .. tab3 based on * <abc:isAllow>false</abc:isAllow>*. Now i'm doing in following way.Note , based on abc:isAllow values i need to pick contextRef="con1" or contextRef="con1".
    select
    case extractValue(xmlfile ,'//abc:isAllow', 'xxx:bac="http://www.abc.com/abc"')
      when 'true' then extractValue(xmlfile ,'//abc:tab1[@contextRef="con1"]', 'xxx:bac="http://www.abc.com/abc"')
      else  extractValue(xmlfile ,'//*abc:tab1*[@contextRef="*con2*"]', 'xxx:bac="http://www.abc.com/abc"')
      end as tab1,
    case extractValue(xmlfile ,'//abc:isAllow', 'xxx:bac="http://www.abc.com/abc"')
      when 'true' then extractValue(xmlfile ,'//abc:tab2[@contextRef="con1"]', 'xxx:bac="http://www.abc.com/abc"')
      else  extractValue(xmlfile ,'//abc:tab2*[@contextRef="con2"]', 'xxx:bac="http://www.abc.com/abc"')
      end as tab2,
    case extractValue(xmlfile ,'//abc:isAllow', 'xxx:bac="http://www.abc.com/abc"')
      when 'true' then extractValue(xmlfile ,'//*abc:tab3*[@contextRef="con1"]', 'xxx:bac="http://www.abc.com/abc"')
      else  extractValue(xmlfile ,'//abc:tab3[@contextRef="con2"]', 'xxx:bac="http://www.abc.com/abc"')
      end as tab3
    from xml_tableI think , above query might not be optimized because "case when" part will ready abc:isAllow for each tag. and my actual xml is containing more than 200 tag. Any one suggest good way to handle this query.
    Regards,
    thees_k.

    TrySELECT XMLTYPE.GetClobVal
              (XMLELEMENT
                    ("variable",
                     XMLAttributes('vcInternationalDate[]' AS "type"),
                     XMLAGG(XMLELEMENT("item",
                                       CASE
                                          WHEN TEMPO IS NOT NULL
                                          THEN XMLELEMENT("utc", TO_CHAR(TIME, 'dd/MM/yyyy HH24:MI:SS'))
                                       END),
                            XMLELEMENT("timezone_offSet", TIMEZONE)))) AS "CREATIONDATE"
      FROM twgenericosdb.TEST
    WHERE ID = 1You could replace CASE with NVL2SELECT XMLTYPE.GetClobVal
              (XMLELEMENT("variable",
                          XMLAttributes('vcInternationalDate[]' AS "type"),
                          XMLAGG(XMLELEMENT("item",
                                            NVL2(TEMPO,
                                                 XMLELEMENT("utc", TO_CHAR(TIME, 'dd/MM/yyyy HH24:MI:SS')),
                                                 NULL),
                                            XMLELEMENT("timezone_offSet", TIMEZONE))))) AS "CREATIONDATE"
      FROM twgenericosdb.TEST
    WHERE ID = 1Urs
    Edited by: metzguar on 06.05.2010 15:04

  • Cannot print complete document

    Setup:
    PC1
    Windows XP
    Adobe XI
    Xerox WC 6400
    Server 2003 - Print server
    PC2
    Windows 7
    Adobe X
    Xerox Phaser 8560MFP
    Server 2003 - Print server (different)
    Problem:
    Initial problem was printing any page after first off centered. We corrected that problem by choosing "print as image." PC1 and PC2
    Second problem was printing more than 4 pages. 23-page document would only print 4 pages. Windows would only show 4 pages in the spooler, but I could see Reader XI was still compiling the document. PC1 only.
    What I've done:
    I was able to duplicate the first issue on PC2. I was NOT able to reproduce the second issue. I had no trouble at all printing the full document in one go. This document is the smallest document printed to go into a report, and all of the other documents print without issue on PC1.
    Question:
    Since I'm sure Microsoft would say that Adobe Reader is the problem, and Adobe would say Windows is the problem, I'm asking here, hoping for a neutral opinion. I can't tell if the problem is the PDF (since it did print correctly somewhere else), the print server (since it does print larger documents), or the PC (since it was able to send the correct information to the same printer through the same server for other PDFs).

    Save it as a pdf and then try printing it.

  • Online Redefinition of Binary XML column not possible?

    DB version 11.2.0.1 x64 (still working on upgrading to 11.2.0.3)
    create table redef_test (
            id number(19,0) not null,
            xml XMLType,
            primary key (id)
        XMLTYPE COLUMN "XML" STORE AS CLOB;
    table REDEF_TEST created.
    exec dbms_redefinition.can_redef_table( 'USER', 'redef_test' );
    anonymous block completed
    drop table redef_test;
    create table redef_test (
            id number(19,0) not null,
            xml XMLType,
            primary key (id)
        XMLTYPE COLUMN "XML" STORE AS BINARY XML;
    table REDEF_TEST dropped.
    table REDEF_TEST created.
    exec dbms_redefinition.can_redef_table( 'USER', 'redef_test' );
    Error starting at line 1 in command:
    exec dbms_redefinition.can_redef_table( 'USER', 'redef_test' )
    Error report:
    ORA-12090: Kan de tabel "USER"."REDEF_TEST" online niet opnieuw definiëren.
    ORA-06512: in "SYS.DBMS_REDEFINITION", regel 139
    ORA-06512: in "SYS.DBMS_REDEFINITION", regel 1782
    ORA-06512: in regel 1
    12090. 00000 -  "cannot online redefine table \"%s\".\"%s\""
    *Cause:    An attempt was made to online redefine a table that is either a
               clustered table, AQ table, temporary table, IOT overflow table
               or table with FGA/RLS enabled.
    *Action:   Do not attempt to online redefine a table that is  a
               clustered table, AQ table, temporary table, IOT overflow table
               or table with FGA/RLS enabled.Also came across ORA-42040 on the internet while searching for a solution:
    ORA-42040     cannot online redefine table "string"."string" with column of binary XML type
    Cause:     Do not attempt to online redefine a table with a column of binary XML type.
    Action:     An attempt was made to redefine a table with a column of binary XML type.
    Why this limitation to binary xml? I was under the impression that binary xml was put forward by oracle as the 'format of the future'; yet an important feature as online redefinition cannot be used anymore it seems.
    My reason for this question: I have a table that should have been partitioned (based on a virtual column derived from an xpath in the xml column) but isn't at this moment. I'm trying to use online redefinition to partition the existing table, but all the suggested ways of doing this don't seem to work.
    Another thing i tried was a 'CTAS', but those seem to have problems with virtual columns.
    CREATE TABLE d_new (
        id,
        xml,
        PRIMARY KEY (id)
    XMLTYPE COLUMN xml STORE AS SECUREFILE BINARY XML
    VIRTUAL COLUMNS
        timestamp AS (TO_TIMESTAMP(extractvalue(xml,'/e:d/c:dHeader/c:creationTime',
            'xmlns:e="http://www.example.com/myproject/schema/e/nl"
             xmlns:c="http://www.example.com/myunidoc/schema/common"'),'YYYY-MM-DD"T"HH24:MI:SS'))
    PARTITION BY RANGE (timestamp)
        PARTITION p2010_09 VALUES LESS THAN (TO_DATE('1-10-2010','DD-MM-YYYY')),
        PARTITION p2012_05 VALUES LESS THAN (TO_DATE('1-6-2012','DD-MM-YYYY')),
        PARTITION px VALUES LESS THAN (MAXVALUE)
    as
    select id,xml from d_table;
    Error at Command Line:40 Column:19
    Error report:
    SQL Error: ORA-54014: De resultatentabel van een CTAS-bewerking bevat een of meer virtuele kolommen.

    I would have tested it myself but my current version (11.2.0.3) has a bug regarding virtual columns...
    One thing you can try is :
    1) Create your new empty partitioned table (D_NEW) with only one partition
    2) Perform an ALTER TABLE EXCHANGE PARTITION between old and new tables
    3) Drop old table
    4) SPLIT PARTITIONs on the new table

  • [11g] XML Schema full validation with binary XML ?

    Hi,
    Oracle's doc quotes " Loading XML data into XML schema-based binary XML storage causes full validation against the target XML schemas. ".
    After registering this XML Schema which indicates that a company must have at least a code, name and pilotes element :
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb"
    xdb:storeVarrayAsTable="true" version="1.0">
    <xsd:element name="compagnie" type="compagnieType"/>
    <xsd:complexType name="compagnieType">
    <xsd:sequence>
    <xsd:element name="comp" type="compType" minOccurs="1" xdb:SQLName="COMP"/>
    <xsd:element name="pilotes" type="pilotesType" minOccurs="1" xdb:SQLName="PILOTES"/>
    <xsd:element name="nomComp" type="nomCompType" minOccurs="1" xdb:SQLName="NOMCOMP"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="pilotesType">
    <xsd:sequence>
    <xsd:element minOccurs="1" maxOccurs="unbounded"
    name="pilote" type="piloteType" xdb:SQLName="PILOTE"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="piloteType">
    <xsd:sequence>
    <xsd:element name="nom" type="nomType" xdb:SQLName="NOM"/>
    <xsd:element name="salaire" type="salaireType" minOccurs="0"
         xdb:SQLName="SALAIRE"/>
    </xsd:sequence>
    <xsd:attribute name="brevet" xdb:SQLName="BREVET">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1"/>
    <xsd:maxLength value="4"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:attribute>
    </xsd:complexType>
    I can therefore insert a row no valid into this table
    CREATE TABLE compagnie_binaryXML_grammaire OF XMLType
    XMLTYPE STORE AS BINARY XML
    XMLSCHEMA "http://www.soutou.net/compagnies3.xsd"
    ELEMENT "compagnie"
    ALLOW NONSCHEMA
    VIRTUAL COLUMNS (vircolcomp AS (EXTRACTVALUE(OBJECT_VALUE,'/compagnie/comp')));
    SQL> INSERT INTO compagnie_binaryXML_grammaire VALUES
    2 (XMLTYPE.CREATEXML('<?xml version="1.0" encoding="ISO-8859-1"?>
    3 <compagnie>
    4 <pilotes></pilotes>
    5 <nomComp>No pilot and no comp!</nomComp>
    6 </compagnie>').CREATESCHEMABASEDXML('http://www.soutou.net/compagnies3.xsd'
    1 ligne crÚÚe.
    Unless the following instruction is done, no valid XML file can be added.
    ALTER TABLE compagnie_binaryXML_grammaire
         ADD CONSTRAINT valide_compagniebinaryXML
         CHECK (XMLIsValid(OBJECT_VALUE) = 1);
    Where is the difference between the behaviour of an object-relational table ?

    My guess is that the virtual column spoils the soup (could you check).
    The following works for me on 11.1.0.6.0.
    connect / as sysdba
    drop user test cascade;
    create user test identified by test;
    grant xdbadmin, dba to test;
    connect test/test
    spool encoding_test01.txt
    var schemaPath varchar2(256)
    var schemaURL  varchar2(256)
    set long 100000000
    col SCHEMA_URL FOR a60
    col object_name for a50
    select * from v$version;
    purge recyclebin;
    alter session set recyclebin=OFF;
    drop table VALIDATE_XML_SCHEMA;
    prompt  Create Folder for TEST schema, user
    declare
       retb boolean;
    begin
      retb := dbms_xdb.createfolder('/test');
    end;
    prompt  =================================================================
    prompt  Register Relational XML SChema
    prompt  =================================================================
    prompt  XML SChema
    begin
      :schemaURL  := 'http://www.relational.com/root.xsd';
      :schemaPath := '/test/root_relational.xsd';
    end;
    prompt  Cleaning up
    call  DBMS_XMLSCHEMA.deleteSchema(:schemaURL,4);
    commit;
    prompt  XSD Schema
    declare
      res boolean;
      xmlSchema xmlType := xmlType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xdb="http://xmlns.oracle.com/xdb"
                xmlns="http://www.relational.com/root.xsd" targetNamespace="http://www.relational.com/root.xsd"
                elementFormDefault="qualified"
                attributeFormDefault="unqualified"
                xdb:storeVarrayAsTable="true">
         <xs:element name="ROOT" xdb:defaultTable="ROOT_TABLE" xdb:maintainDOM="false">
              <xs:annotation>
                   <xs:documentation>Example XML Schema</xs:documentation>
              </xs:annotation>
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="ID" type="xs:integer" xdb:SQLName="ID"/>
                        <xs:element ref="INFO"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="INFO" xdb:SQLName="INFO_TYPE">
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="INFO_ID" type="xs:integer" xdb:SQLName="TYPE_INFO_ID"/>
                        <xs:element name="INFO_CONTENT"
                    xdb:SQLName="TYPE_INFO_CONTENT" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>');
    begin
    if (dbms_xdb.existsResource(:schemaPath)) then
        dbms_xdb.deleteResource(:schemaPath);
    end if;
    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    end;
    alter session set events='31098 trace name context forever';
    BEGIN
      DBMS_XMLSCHEMA.registerSchema
      (SCHEMAURL => :schemaURL,
      SCHEMADOC => xdbURIType(:schemaPath).getClob(),
      LOCAL     => TRUE,   -- local
      GENTYPES  => FALSE,  -- generate object types
      GENBEAN   => FALSE,  -- no java beans
      GENTABLES => FALSE,  -- generate object tables
      OWNER     => USER);
    END;
    commit;
    prompt  =================================================================
    prompt  Register Binary XML SChema
    prompt  =================================================================
    prompt  XML SChema
    begin
      :schemaURL  := 'http://www.binary.com/root.xsd';
      :schemaPath := '/test/root_binary.xsd';
    end;
    prompt  Cleaning up
    call  DBMS_XMLSCHEMA.deleteSchema(:schemaURL,4);
    commit;
    prompt  XSD Schema
    declare
      res boolean;
      xmlSchema xmlType := xmlType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xdb="http://xmlns.oracle.com/xdb"
                xmlns="http://www.binary.com/root.xsd" targetNamespace="http://www.binary.com/root.xsd"
                elementFormDefault="qualified"
                attributeFormDefault="unqualified"
                xdb:storeVarrayAsTable="true">
         <xs:element name="ROOT" xdb:defaultTable="ROOT_TABLE" xdb:maintainDOM="false">
              <xs:annotation>
                   <xs:documentation>Example XML Schema</xs:documentation>
              </xs:annotation>
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="ID" type="xs:integer" xdb:SQLName="ID"/>
                        <xs:element ref="INFO"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="INFO" xdb:SQLName="INFO_TYPE">
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="INFO_ID" type="xs:integer" xdb:SQLName="TYPE_INFO_ID"/>
                        <xs:element name="INFO_CONTENT"
                    xdb:SQLName="TYPE_INFO_CONTENT" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>');
    begin
    if (dbms_xdb.existsResource(:schemaPath)) then
        dbms_xdb.deleteResource(:schemaPath);
    end if;
    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    end;
    alter session set events='31098 trace name context forever';
    BEGIN
      DBMS_XMLSCHEMA.registerSchema
      (SCHEMAURL => :schemaURL,
      SCHEMADOC => xdbURIType(:schemaPath).getClob(),
      LOCAL     => TRUE,   -- local
      GENTYPES  => FALSE,  -- generate object types
      GENBEAN   => FALSE,  -- no java beans
      GENTABLES => FALSE,  -- generate object tables
      OPTIONS   => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
      OWNER     => USER);
    END;
    commit;
    prompt  =================================================================
    prompt  Register SECOND Binary XML SChema
    prompt  =================================================================
    prompt  XML SChema
    begin
      :schemaURL  := 'http://www.different.com/roots.xsd';
      :schemaPath := '/test/roots.xsd';
    end;
    prompt  Cleaning up
    call  DBMS_XMLSCHEMA.deleteSchema(:schemaURL,4);
    commit;
    prompt  XSD Schema
    declare
      res boolean;
      xmlSchema xmlType := xmlType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xdb="http://xmlns.oracle.com/xdb"
                xmlns="http://www.different.com/roots.xsd" targetNamespace="http://www.different.com/roots.xsd"
                elementFormDefault="qualified"
                attributeFormDefault="unqualified"
                xdb:storeVarrayAsTable="true">
         <xs:element name="ROOTS" xdb:maintainDOM="false">
              <xs:annotation>
                   <xs:documentation>Example XML Schema</xs:documentation>
              </xs:annotation>
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="ID" type="xs:integer" xdb:SQLName="ID"/>
                        <xs:element ref="INFO"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="INFO" xdb:SQLName="INFO_TYPE">
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="INFO_ID" type="xs:integer" xdb:SQLName="TYPE_INFO_ID"/>
                        <xs:element name="INFO_CONTENT"
                    xdb:SQLName="TYPE_INFO_CONTENT" type="xs:string"/>
                   </xs:sequence>          </xs:complexType>
         </xs:element>
    </xs:schema>');
    begin
    if (dbms_xdb.existsResource(:schemaPath)) then
        dbms_xdb.deleteResource(:schemaPath);
    end if;
    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    end;
    alter session set events='31098 trace name context forever';
    BEGIN
      DBMS_XMLSCHEMA.registerSchema
      (SCHEMAURL => :schemaURL,
      SCHEMADOC => xdbURIType(:schemaPath).getClob(),
      LOCAL     => TRUE,   -- local
      GENTYPES  => FALSE,  -- generate object types
      GENBEAN   => FALSE,  -- no java beans
      GENTABLES => FALSE,  -- generate object tables
      OPTIONS   => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
      OWNER     => USER);
    END;
    commit;
    prompt  =================================================================
    prompt  END Registration Process
    prompt  =================================================================
    select xmlType(xdbURIType ('/test/root.xsd').getClob())
    from   dual;
    alter session set events='31098 trace name context forever';
    select schema_url, binary
    from   user_xml_schemas;
    select * from tab;
    select object_name, object_type from user_objects;
    prompt  =================================================================
    prompt  BASICFILE - XMLSCHEMA (default) - DISALLOW NONSCHEMA
    prompt  =================================================================
    drop table "VALIDATE_XML_SCHEMA";
    create table "VALIDATE_XML_SCHEMA" of XMLTYPE
    XMLTYPE STORE AS BASICFILE BINARY XML
    XMLSCHEMA "http://www.binary.com/root.xsd"
      ELEMENT "ROOT";
    prompt  No schema defined
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT>
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  Bogus, noexistent schema defined
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.bogus.com/root.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  Binary schema defined
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.binary.com/root.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  Binary schema with different location path
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOTS xmlns="http://www.different.com/roots.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOTS>'))
    prompt  Binary schema with incorrect "root(s)"
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.different.com/roots.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  Relational registered schema
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.relational.com/root.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  =================================================================
    prompt  BASICFILE - XMLSCHEMA - ALLOW NONSCHEMA
    prompt  =================================================================
    drop table "VALIDATE_XML_SCHEMA";
    create table "VALIDATE_XML_SCHEMA" of XMLTYPE
    XMLTYPE STORE AS BASICFILE BINARY XML
    XMLSCHEMA "http://www.binary.com/root.xsd"
      ELEMENT "ROOT"
    ALLOW NONSCHEMA;
    prompt  No schema defined
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT>
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  Bogus, noexistent schema defined
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.bogus.com/root.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  Binary schema defined
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.binary.com/root.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  Binary schema with different location path
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOTS xmlns="http://www.different.com/roots.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOTS>'))
    prompt  Binary schema with incorrect "root(s)"
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.different.com/roots.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    prompt  Relational registered schema
    insert into "VALIDATE_XML_SCHEMA"
    values
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <ROOT xmlns="http://www.relational.com/root.xsd">
      <ID>0</ID>
      <INFO>
        <INFO_ID>0</INFO_ID>
        <INFO_CONTENT>Text</INFO_CONTENT>
      </INFO>
    </ROOT>'))
    -- Output
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE     11.1.0.6.0     Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    5 rows selected.
    Recyclebin purged.
    Session altered.
    drop table VALIDATE_XML_SCHEMA
    ERROR at line 1:
    ORA-00942: table or view does not exist
    Create Folder for TEST schema, user
    declare
    ERROR at line 1:
    ORA-31003: Parent / already contains child entry test
    ORA-06512: at "XDB.DBMS_XDB", line 316
    ORA-06512: at line 4
    =================================================================
    Register Relational XML SChema
    =================================================================
    XML SChema
    PL/SQL procedure successfully completed.
    Cleaning up
    call  DBMS_XMLSCHEMA.deleteSchema(:schemaURL,4)
    ERROR at line 1:
    ORA-31000: Resource 'http://www.relational.com/root.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 106
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 102
    ORA-06512: at line 1
    Commit complete.
    XSD Schema
    PL/SQL procedure successfully completed.
    Session altered.
    PL/SQL procedure successfully completed.
    Commit complete.
    =================================================================
    Register Binary XML SChema
    =================================================================
    XML SChema
    PL/SQL procedure successfully completed.
    Cleaning up
    call  DBMS_XMLSCHEMA.deleteSchema(:schemaURL,4)
    ERROR at line 1:
    ORA-31000: Resource 'http://www.binary.com/root.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 106
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 102
    ORA-06512: at line 1
    Commit complete.
    XSD Schema
    PL/SQL procedure successfully completed.
    Session altered.
    PL/SQL procedure successfully completed.
    Commit complete.
    =================================================================
    Register SECOND Binary XML SChema
    =================================================================
    XML SChema
    PL/SQL procedure successfully completed.
    Cleaning up
    call  DBMS_XMLSCHEMA.deleteSchema(:schemaURL,4)
    ERROR at line 1:
    ORA-31000: Resource 'http://www.different.com/roots.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 106
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 102
    ORA-06512: at line 1
    Commit complete.
    XSD Schema
    PL/SQL procedure successfully completed.
    Session altered.
    PL/SQL procedure successfully completed.
    Commit complete.
    =================================================================
    END Registration Process
    =================================================================
    Session altered.
    SCHEMA_URL                                                   BIN
    http://www.relational.com/root.xsd                           NO
    http://www.binary.com/root.xsd                               YES
    http://www.different.com/roots.xsd                           YES
    3 rows selected.
    no rows selected
    no rows selected
    =================================================================
    BASICFILE - XMLSCHEMA (default) - DISALLOW NONSCHEMA
    =================================================================
    drop table "VALIDATE_XML_SCHEMA"
    ERROR at line 1:
    ORA-00942: table or view does not exist
    Table created.
    No schema defined
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    ERROR at line 3:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LSX-00021: undefined element "ROOT"
    Bogus, noexistent schema defined
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    ERROR at line 3:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://www.bogus.com/root.xsd"
    Binary schema defined
    1 row created.
    Binary schema with different location path
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    ERROR at line 3:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://www.different.com/roots.xsd"
    Binary schema with incorrect "root(s)"
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    ERROR at line 3:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://www.different.com/roots.xsd"
    Relational registered schema
    (xmltype('<?xml version="1.0" encoding="UTF-8"?>
    ERROR at line 3:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://www.relational.com/root.xsd"
    =================================================================
    BASICFILE - XMLSCHEMA - ALLOW NONSCHEMA
    =================================================================
    Table dropped.
    Table created.
    No schema defined
    1 row created.
    Bogus, noexistent schema defined
    1 row created.
    Binary schema defined
    1 row created.
    Binary schema with different location path
    1 row created.
    Binary schema with incorrect "root(s)"
    1 row created.
    Relational registered schema
    1 row created.

  • How can I display Excel document saved as html in ebDynpro Office Contol?

    Hello,
    I have a problem with displaying of Excel document saved as html inside WebDynpro Office Control.
    Could you explain why OfficeControl cannot display Excel document with content type =text/htm?
    How you know, control must be bound to binary data. And then mime type is set as
    bin.setMimeType(new WebResourceType("html", "text/html", false));
    The empty document is displayed always.
    Nevertheless, excel file is displayed perfect, when
    bin.setMimeType(new WebResourceType("xls ", "application/msexcel", false));

    The OfficeControl UI element is made available as an ActiveX control, so that the UI element can be displayed in browsers that support ActiveX controls.
    The ActiveX control enables display of the following documents:
    1.Microsoft Word documents with the doc file extension
    2.Microsoft Excel documents with the xls file extension
    This is the reason why document with other content types are not displayed.
    Data source must be bound to binary data because files are read as bytes in this scenario.
    Hope this helps you.
    Do let me know if your problem is solved.
    Regards,
    Vijith

  • Range partitioning on virtual column based on binary xmltype column

    Alright, our DBA finally got around to upgrading to 11.2.0.2. Now I'm running into another issue:
    CREATE TABLE USER.DI_D2
        ID NUMBER(19, 0) NOT NULL ,
        XML SYS.XMLTYPE ,
        PRIMARY KEY ( ID )
      XMLTYPE XML STORE AS SECUREFILE BINARY XML
      VIRTUAL COLUMNS
        ts AS (TO_TIMESTAMP(extractvalue(xml,'/d:d/c:dHeader/c:creationTime',
            'xmlns:d="http://www.example.com/m/d/schema/di"
             xmlns:c="http://www.example.com/m/schema/common"'),'YYYY-MM-DD"T"HH24:MI:SS'))
      PARTITION BY RANGE (ts)
        PARTITION d_p2012_07 VALUES LESS THAN (TO_DATE('1-8-2012','DD-MM-YYYY')),
        PARTITION d_px VALUES LESS THAN (MAXVALUE)
      );On our old 11.2.0.1 install this command works fine (tho due to other issues 11.2.0.1 doesn't work for our search queries)
    On our 11.2.0.2 install, I get the following error:
    Error at Command Line:10 Column:37
    Error report:
    SQL Error: ORA-14513: Partitiekolom mag niet van het gegevenstype object zijn.
    14513. 00000 -  "partitioning column may not be of object datatype"
    *Cause:    Partitioning column specified by the user was an object datatype
               (object, REF, nested table, array) which is illegal.
    *Action:   Ensure that no partitioning column is an object datatype.Anyone know what's up with that? What changed between the 2 DB versions that could cause this to fail?

    Alright, seems that's just a display issue then.
    Looking in user_lobs like suggested above gives
    TABLE_NAME COLUMN_NAME SECUREFILE
    DI_D       XMLDATA     YES        I was opening the table in SQL Developer and then looking in the tab SQL (12th tab); with a XmlType table it seems to always show Basicfile even if it's actually a Securefile.
    I'd like to use the suggested xmlcast/xmlquery solution, however it doesn't seem to play well with our custom timestamp format.
    "CREATION_TIME" AS (XMLCAST(XMLQUERY('declare default element namespace "http://www.example.com/m/d/schema/i";declare namespace c="http://www.example.com/m/schema/common";/d/c:dHeader/c:creationTime' PASSING OBJECT_VALUE RETURNING CONTENT) AS TIMESTAMP))
    Error at Command Line:1 Column:0
    Error report:
    SQL Error: ORA-54002: In de uitdrukking van een virtuele kolom kunnen alleen zuivere functies worden opgegeven.
    "CREATION_TIME" AS (TO_TIMESTAMP(XMLQUERY('declare default element namespace "http://www.example.com/m/d/schema/i";declare namespace c="http://www.example.com/m/schema/common";/d/c:dHeader/c:creationTime' PASSING OBJECT_VALUE RETURNING CONTENT),'YYYY-MM-DD"T"HH24:MI:SS'))
    Error at Command Line:9 Column:45
    Error report:
    SQL Error: ORA-00932: inconsistente gegevenstypen: - verwacht, - gekregen
    00932. 00000 -  "inconsistent datatypes: expected %s got %s"
    *Cause:   
    *Action:
    "CREATION_TIME" AS (TO_TIMESTAMP(EXTRACTVALUE("OBJECT_VALUE",'/di:d/c:dHeader/c:creationTime','xmlns:di="http://www.example.com/m/d/schema/i" xmlns:c="http://www.example.com/m/schema/common"'),'YYYY-MM-DD"T"HH24:MI:SS'))
    table "USER"."DI_D" created.

  • [11g] adding a virtual col to a binary XML table?

    Hi
    Is it possible to add a virtual col to an existing binay XML table ?
    CREATE TABLE compagnie_binaryXML OF XMLType
    XMLTYPE STORE AS BINARY XML
    VIRTUAL COLUMNS
    (vircolcomp AS (EXTRACTVALUE(OBJECT_VALUE,'/compagnie/comp')),
    vircolnomcomp AS (EXTRACTVALUE(OBJECT_VALUE,'/compagnie/nomComp')),
    vircolnompil AS (EXTRACTVALUE(OBJECT_VALUE,'/compagnie/pilotes/pilote/nom')),
    vircolbrevpil AS (EXTRACTVALUE(OBJECT_VALUE,'/compagnie/pilotes/pilote/@brevet')));
    OK, but
    ALTER TABLE compagnie_binaryXML ADD vircolsalpil AS (EXTRACTVALUE(OBJECT_VALUE,'/compagnie/pilotes/pilote/s
    alaire'));
    ORA-22856: impossible d'ajouter des colonnes à des tables objet

    Hi
    IMHO this has nothing to do with XMLType... They simply forget to change the checks performed before adding a column... In fact, this is a "known problem" with object tables.
    SQL> create type ttt as object (n number);
      2  /
    SQL> create table t of ttt;
    SQL> alter table t add v as (to_char(n));
    alter table t add v as (to_char(n))
    ERROR at line 1:
    ORA-22856: cannot add columns to object tables
    oracle@helicon:~/ [DBA11106] oerr ora 22856
    22856, 00000, "cannot add columns to object tables"
    // *Cause:   An attempt was made to add columns to an object table. Object
    //           tables cannot be altered to add columns since its
    //           definition is based on an object type.
    // *Action:  Create a new type with additional attributes, and use the new
    //           type to create an object table. The new object table will have
    //           the desired columns.In summary, I would open an SR and let fix the problem.
    HTH
    Chris

  • Add a unique constraint on binary XML table

    How add a unique constraint of "brevet" field?
    The following INSERT failed
    SQL Error: ORA-19025: EXTRACTVALUE renvoie la valeur d'un seul noeud
    19025. 00000 - "EXTRACTVALUE returns value of only one node"
    If the ALTER is made after the INSERT is done, INSERT is valid but ALTER failed with the same error message!
    /* copy the file compavions.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <compagnie>
         <comp>AB</comp>
         <flotte>
              <avion immat="F-WTSS" capacite="90">
                   <typeAv>Concorde</typeAv>
              </avion>
              <avion immat="F-GFDR" capacite="145">
                   <typeAv>A320</typeAv>
              </avion>
              <avion immat="F-GTYA" capacite="150">
                   <typeAv>A320</typeAv>
              </avion>
         </flotte>
         <nomComp>Air Blagnac</nomComp>
         <pilotes>
              <pilote>
              <brevet>PL-1</brevet>
              <nom>C. Sigaudes</nom>
              </pilote>
              <pilote>
              <brevet>PL-2</brevet>
              <nom>P. Filloux</nom>
              </pilote>
         </pilotes>
    </compagnie>
    in C:\...
    --DROP DIRECTORY repxml;
    --CREATE DIRECTORY repxml AS 'C:\...';
    DROP TABLE pilote_binary_xml5;
    CREATE TABLE pilote_binary_xml5 OF XMLType
    XMLTYPE STORE AS BINARY XML
    VIRTUAL COLUMNS
    (col AS (EXTRACTVALUE(OBJECT_VALUE, '/compagnie/pilotes/pilote/brevet')));
    ALTER TABLE pilote_binary_xml5 ADD CONSTRAINT brevet_unique UNIQUE (col);
    INSERT INTO pilote_binary_xml5 VALUES (XMLType(BFILENAME ('REPXML','compavions.xml'), NLS_CHARSET_ID ('AL32UTF8')));
    --ALTER TABLE pilote_binary_xml5 ADD CONSTRAINT brevet_unique UNIQUE (col);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You could try something like
    (extract(OBJECT_VALUE,compagnie/pilotes/pilote/brevet').getStringVal());
    but this is probably unadvisable.
    I suggest an alternative is for you to look at XMLINDEX so that you can bring the 'proper' XML functions into play like XMLTABLE etc.

  • How to data from SYS.XMLType column in database.

    Using BPEL 10.1.3.1
    I have a database adapter to a table in my oracle database that has several columns. One column (named 'xml_content') in the table is the type SYS.XMLTYPE.
    When I invoke the database adapter in BPEL the value always returns the following:
    <xmlContent>oracle.xml.parser.v2.XMLDocument@18eba9f</xmlContent>
    I need help with the steps to actually retrieve the value (either in string format, or xml).
    Nothing seems to document working with SYS.XMLTYPE columns in BPEL.
    Thanks!
    Mike

    Got it working now. I used the 'extract' function in my select statement, but had to add the .getStringValue() fuction. The extract function, just by itself, returns an XMLDocument type. The call for the column in the SQL statement looked like this.
    extract(XML_CONTENT, '/ROOTOBJECT').getStringVal() xml_content
    Thanks so much for your help. Problem solved!

  • The size of a XML document stored in a XMLType table

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)?
    For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based)
    SQL> r
    1 select dbms_lob.getlength(t.gegevens.getclobval()) "SIZE"
    2 from hgo.hgo010_detam t
    3* where rownum < 2
    SIZE
    2750

  • IE + SVG = "Cannot display XML page" ?

    Dear friends,
       I am from Taiwan.  I have a question about SVG display on IE. 
       I have a very simply SVG file as the following code.  I installed Ferdora R12 with apache web server (192.168.0.8) inside my company.
    I installed Tomcat 6.0 on my PC(192.168.0.100, window 7 with IE8.0).  I put this SVG file on Fedora, and I can see the vector graphs through
    Chrome and Firefox, but not IE(already installed SVG viewer, with the error message as following).  I put this SVG file on my PC, I can see the vector graphs by IE, Chrome and Firefox through Tomcat or opening file directly. I even put this SVG file on the web server of my company, and vector graphs can be displayed well through all of IE, Chrome and Firefox.
      The problem seems only happen in the situation "Fedora R12 + IE".  Do you have any idea of this problem?  I really need your help.
      Thank you.
    ======= Code =============
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg id="svg00" version="1.1" xmlns="http://www.w3.org/2000/svg" >
    <svg id="svg01" x="0" y="0" width="654.1" height="654.1" version="1.1" xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink">
        <a xlink:href="http://www.w3.org//Graphics//SVG//Overview.htm8">
            <rect x="10" y="10" width="100" height="30" rx="10" ry="10"
                  style="fill:lightgrey"/>
            <text x="30" y="30" font-size="12">Click here</text>
        </a>
        <a xlink:href="http://www.ibm.com//developerworks/">
            <circle cx="100" cy="100" r="50" style="fill:grey"/>
            <text x="80" y="100" font-size="12">Or here</text>
        </a>
        <a xlink:href="http://www.ibm.com/" target="new">
            <polygon
                  points="60 160,165 172,180 60,290 290,272 280,172 285,250 255"
                  style="fill:dimgrey"/>
            <text x="160" y="200" font-size="12">Or even here</text>
        </a>
    </svg>
    </svg>
    ==========================
    The error message is in Chinese, but I translate it as possible as I can.
    ====== Error message ==========
    Cannot display XML page
    Cannot use style table (or form) to view XML input. Please correct this problem and reload this page, or try again later.
    Unidentified error with processing resourse
    There is something wrong with 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'
    =============================

    Hi,
    The string is not correctly formed ( a quote and a concatenation ) :
    Your url :
    v_url:=nvl(v_rep_port,'http://'||v_rep_HOST ||':'||v_rep_port||')||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_rep_svr;
    The Correction :
    v_url:=nvl(v_rep_port,'http://'||v_rep_HOST ||':'||v_rep_port)||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_rep_svr;
    Hope it helps
    Mohamed Dadi

  • Acroread 8.1.2 cannot display some Japanese documents

    For details and a test .pdf file see:
    http://bugzilla.novell.com/show_bug.cgi?id=376856
    acroread 8.1.2 cannot display some Japanese documents although
    the Japanese font package and the CMaps are installed.
    Checking which fonts are used in the testfile ~RubiJapanese.pdf~:
    mfabian@magellan:~/test-texts/pdf/japanese$ pdffonts RubiJapanese.pdf
    name type emb sub uni object ID
    MS-Mincho CID TrueType no no no 10 0
    Arial-Black TrueType no no no 14 0
    Arial-BlackItalic TrueType no no no 15 0
    mfabian@magellan:~/test-texts/pdf/japanese$
    I.e., this document uses the ~MS-Mincho~ font which comes with
    Microsoft Windows. It is not embedded, therefore Acroread has to
    search for it on the system and if it cannot find it it should replace
    it with a fallback Japanese font.
    I have this font installed on the Machine where I am testing but
    acroread fails to use it, complains about missing CJK support
    (which is not true) and displays only dots instead of Japanese
    characters.
    You can get the test document from the above mentioned
    bugreport, it is attached to comment #1:
    http://bugzilla.novell.com/show_bug.cgi?id=376856#c1

    Neha,
    Thanks for the response.
    We are running acroread headlessly since it is on a remote server that we access via telnet. Without an XServer session, I can't tell whether acroread is able to read and display the PDF files normally. However, we can view the PDFs with Adobe Reader 8.1.2 on Windows and the acroread -toPostScript command-line that we are using does work properly with other PDFs.
    I will email you a copy of a problematic PDF shortly.
    Regards,
    Steven Dickson

Maybe you are looking for

  • Cannot upload music file in Response Group Workflow

    Hi Support, This is multi site deployment. 3 site Lync 2013 Enterprise Edition, site A, B and C. I'm creating Hunt Group via Response Groupconfiguration tool in Site A. when I try to upload the music file for 'after business hour message' and 'music

  • PLM Web UI ACM/ACL issue

    Hi All, I am configuring PLM Business package/ Web UI in portal. Version EHP4. (PLM Web UI) Every screen (Material, BOM) giving me error "Authorizations are missing" . I know this trusted user issue. I provided the role "SAP_PLMWUI_TRUSTED_USER_ALL"

  • HDMI cable

    can anyone tell me if there should be a HDMI cable in the box which comes with the bb tablet because i am missing it

  • Report like MCEC work on actual data(MRP)

    Dear All, Is there any report like mcec that work on operative planning(MRP), bt not work on simulative planning. I want the same data(purchase plan) after executing MRP. Thanks

  • I CAN NOT RECEIVE MY MESSAGES FROM FACEBOOK

    I HAVE ALWAYS BEEN ABLE TO RECEIVE MESSAGES TO MY PHONE UNTIL SOMEONE HACKED INTO MY ACCOUNT AND I HAD TO CHANE MY PASSWORD 2 TIMES. NOW I CANNOT RECEIVE MESSAGES. IT SAYS THAT MY PHONE IS ALL SET UP AND READY TO GO. I HAVE TRIED DELETING IT AND STAR