Questions relating to Processing  ACORD TXLIFE XML content

<PropertyName xmlns="http://ACORD.org/Standards/Life/2">LastName</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">GovtID</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">GovtIDTc</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">ResidenceState</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">ActivityTypeCode</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">ActivityDescription</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">UserCode</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">ActivityTypeCode</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">ActivityStatus</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">ActivityTypeCode</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">Closed</PropertyName>
<PropertyName xmlns="http://ACORD.org/Standards/Life/2">Closed</PropertyName>
i want to extract these values
LastName
GovtID
GovtIDTc
ResidenceState like this i am using the query here can any body help me on this
For I In (SELECT extract(value(t),'//CriteriaExpression/Criteria/PropertyName','xmlns="http://ACORD.org/Standards/Life/2"').getstringval() pname
FROM TABLE (XMLSEQUENCE (EXTRACT(xml_data_val,'/TXLife/TXLifeRequest/CriteriaExpression','xmlns="http://ACORD.org/Standards/Life/2"'))) t
LOOP
DBMS_OUTput.PUT_LINE(i.pname);
END LOOP;
Edited by: mdrake on Nov 26, 2010 7:22 PM

This also works well with Object Relatiional storage...
C:\xdb\schemas\ACORD\TxLife>sqlplus /nolog @..\..\doRegistration\registerSchemas %CD% FALSE
SQL*Plus: Release 11.2.0.2.0 Production on Fri Nov 26 15:59:45 2010
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
SQL> spool registerSchemas.log
SQL> --
SQL> set define on
SQL> set timing on
SQL> set trimspool on
SQL> --
SQL> connect / as sysdba
Connected.
SQL> --
SQL> def TARGET_DIRECTORY = &1
SQL> --
SQL> def BINARY_XML = &2
SQL> --
SQL> @&TARGET_DIRECTORY/setVariables
SQL> --
SQL> def USERNAME = TXLIFE
SQL> --
SQL> def PASSWORD = &USERNAME
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> def XMLDIR = &TARGET_DIRECTORY
SQL> --
SQL> def SCHEMA_ARCHIVE_FILE = TxLife.zip
SQL> --
SQL> def MASTER_SCHEMA_PATH = ''
SQL> --
SQL> def SCHEMA_FOLDER = ''
SQL> --
SQL> def LOCATION_PREFIX = http://xmlns.ACORD.org/schemas/Life/2
SQL> --
SQL> def TARGET_NAMESPACE = http://ACORD.org/Standards/Life/2
SQL> --
SQL> --
SQL> @@setTargetFolder
SQL> VAR BINARY_XML           NUMBER;
SQL> VAR SCHEMA_LOCATION_HINT VARCHAR2(700);
SQL> VAR MASTER_SCHEMA_PATH      VARCHAR2(700);
SQL> VAR SCHEMA_FOLDER        VARCHAR2(700);
SQL> VAR LOCATION_PREFIX         VARCHAR2(700);
SQL> VAR TARGET_NAMESPACE        VARCHAR2(700);
SQL> VAR TARGET_FOLDER        VARCHAR2(700);
SQL> VAR SCHEMA_NAME          VARCHAR2(700);
SQL> --
SQL> begin
  2          if ('&BINARY_XML' is null) or (UPPER('&2') = 'FALSE') then
  3            :BINARY_XML := NULL;
  4          else
  5            :BINARY_XML := DBMS_XMLSCHEMA.REGISTER_BINARYXML;
  6          end if;
  7    :SCHEMA_LOCATION_HINT := NULL;
  8          :MASTER_SCHEMA_PATH   := '&MASTER_SCHEMA_PATH';
  9          :SCHEMA_FOLDER        := '&SCHEMA_FOLDER';
10          :LOCATION_PREFIX      := '&LOCATION_PREFIX';
11          :TARGET_NAMESPACE     := '&TARGET_NAMESPACE';
12  end;
13  /
old   2:        if ('&BINARY_XML' is null) or (UPPER('&2') = 'FALSE') then
new   2:        if ('FALSE' is null) or (UPPER('FALSE') = 'FALSE') then
old   8:        :MASTER_SCHEMA_PATH   := '&MASTER_SCHEMA_PATH';
new   8:        :MASTER_SCHEMA_PATH   := '';
old   9:        :SCHEMA_FOLDER        := '&SCHEMA_FOLDER';
new   9:        :SCHEMA_FOLDER        := '';
old  10:        :LOCATION_PREFIX      := '&LOCATION_PREFIX';
new  10:        :LOCATION_PREFIX      := 'http://xmlns.ACORD.org/schemas/Life/2';
old  11:        :TARGET_NAMESPACE     := '&TARGET_NAMESPACE';
new  11:        :TARGET_NAMESPACE     := 'http://ACORD.org/Standards/Life/2';
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.03
SQL> declare
  2    V_ARCHIVE_FILE_NAME  VARCHAR2(700) := '&SCHEMA_ARCHIVE_FILE';
  3  begin
  4
  5    -- Derive Schema Output Folder, Schema Folder and Output File Name from Archive Name.
  6
  7    if (INSTR(V_ARCHIVE_FILE_NAME,'/') > 0) then
  8            V_ARCHIVE_FILE_NAME := substr(V_ARCHIVE_FILE_NAME,instr(V_ARCHIVE_FILE_NAME,'/',-1)+1);
  9    end if;
10    V_ARCHIVE_FILE_NAME := substr(V_ARCHIVE_FILE_NAME,1,instr(V_ARCHIVE_FILE_NAME,'.',-1)-1);
11
12    :TARGET_FOLDER := '/public/&USERNAME/' || V_ARCHIVE_FILE_NAME;
13
14    if (:SCHEMA_FOLDER is null) then
15      :SCHEMA_FOLDER := :TARGET_FOLDER;
16    else
17      :SCHEMA_FOLDER := :TARGET_FOLDER || '/' || :SCHEMA_FOLDER;
18    end if;
19
20    :SCHEMA_NAME := substr(:SCHEMA_FOLDER,instr(:SCHEMA_FOLDER,'/',-1)+1);
21
22    -- Correct Output File Name if a exact path is supplied for the master XML Schema.
23
24          if (:MASTER_SCHEMA_PATH is not null) then
25
26            :SCHEMA_LOCATION_HINT := :LOCATION_PREFIX || '/' || :MASTER_SCHEMA_PATH;
27      :MASTER_SCHEMA_PATH   := :TARGET_FOLDER   || '/' || :MASTER_SCHEMA_PATH;
28
29            if (instr(:MASTER_SCHEMA_PATH,'/') > 0) then
30              :SCHEMA_NAME := substr(:MASTER_SCHEMA_PATH,instr(:MASTER_SCHEMA_PATH,'/',-1)+1);
31            end if;
32
33      :SCHEMA_NAME := substr(:SCHEMA_NAME,1,instr(:SCHEMA_NAME,'.',-1)-1);
34
35      select *
36        into :TARGET_NAMESPACE
37        from XMLTABLE
38             (
39               'let $schema := fn:doc($PATH)
40                return <TARGET_NAMESPACE>{fn:data($schema/@targetNamespace)}</TARGET_NAMESPACE>'
41                passing :MASTER_SCHEMA_PATH as "PATH"
42                columns
43                TARGET_NAMEPACE VARCHAR2(700)
44             );
45    end if;
46
47  end;
48  /
old   2:   V_ARCHIVE_FILE_NAME  VARCHAR2(700) := '&SCHEMA_ARCHIVE_FILE';
new   2:   V_ARCHIVE_FILE_NAME  VARCHAR2(700) := 'TxLife.zip';
old  12:   :TARGET_FOLDER := '/public/&USERNAME/' || V_ARCHIVE_FILE_NAME;
new  12:   :TARGET_FOLDER := '/public/TXLIFE/' || V_ARCHIVE_FILE_NAME;
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> --
SQL> print :TARGET_FOLDER
TARGET_FOLDER
/public/TXLIFE/TxLife
SQL> print :SCHEMA_FOLDER
SCHEMA_FOLDER
/public/TXLIFE/TxLife
SQL> --
SQL> print :TARGET_NAMESPACE
TARGET_NAMESPACE
http://ACORD.org/Standards/Life/2
SQL> --
SQL> @@createUser
SQL> --
SQL> drop user &USERNAME cascade
  2  /
old   1: drop user &USERNAME cascade
new   1: drop user TXLIFE cascade
User dropped.
Elapsed: 00:01:13.27
SQL> begin
  2          if (DBMS_XDB.existsResource(:TARGET_FOLDER)) then
  3            DBMS_XDB.deleteResource(:TARGET_FOLDER,DBMS_XDB.DELETE_RECURSIVE);
  4          end if;
  5  end;
  6  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.04
SQL> commit
  2  /
Commit complete.
Elapsed: 00:00:00.04
SQL> column ANY_PATH FORMAT A256
SQL> column OUTPUT FORMAT A256
SQL> set lines 256 pages 0 long 1000000
SQL> --
SQL> select ANY_PATH
  2    from RESOURCE_VIEW
  3   where under_path(RES,:TARGET_FOLDER) = 1
  4  /
no rows selected
Elapsed: 00:00:00.00
SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
  2  /
old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to TXLIFE identified by TXLIFE
Grant succeeded.
Elapsed: 00:00:00.04
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
  2  /
old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new   1: alter user TXLIFE default tablespace USERS temporary tablespace TEMP
User altered.
Elapsed: 00:00:00.03
SQL> --
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> @@unzipArchive
SQL> create or replace directory &USERNAME as '&XMLDIR'
  2  /
old   1: create or replace directory &USERNAME as '&XMLDIR'
new   1: create or replace directory TXLIFE as 'C:\xdb\schemas\ACORD\TxLife'
Directory created.
Elapsed: 00:00:00.10
SQL> declare
  2    V_RESULT BOOLEAN;
  3    V_PATH   VARCHAR2(700) := :TARGET_FOLDER || '/schemas.zip';
  4  begin
  5          XDB_UTILITIES.mkdir(:TARGET_FOLDER,TRUE);
  6          V_RESULT := DBMS_XDB.createResource(V_PATH,bfilename('&USERNAME','&SCHEMA_ARCHIVE_FILE'));
  7          commit;
  8  end;
  9  /
old   6:        V_RESULT := DBMS_XDB.createResource(V_PATH,bfilename('&USERNAME','&SCHEMA_ARCHIVE_FILE'));
new   6:        V_RESULT := DBMS_XDB.createResource(V_PATH,bfilename('TXLIFE','TxLife.zip'));
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.13
SQL> select ANY_PATH
  2    from RESOURCE_VIEW
  3   where under_path(RES,:TARGET_FOLDER) = 1
  4  /
/public/TXLIFE/TxLife/schemas.zip
Elapsed: 00:00:00.00
SQL> call XDB_IMPORT_UTILITIES.UNZIP(:TARGET_FOLDER || '/schemas.zip',:TARGET_FOLDER,:TARGET_FOLDER || '/unzip.log',XDB_CONSTANTS.RAISE_ERROR)
  2  /
Call completed.
Elapsed: 00:00:00.29
SQL> select ANY_PATH
  2    from RESOURCE_VIEW
  3   where under_path(RES,:TARGET_FOLDER) = 1
  4     and XMLExists
  5         (
  6            'declare default element namespace "http://xmlns.oracle.com/xdb/XDBResource.xsd"; (: :)
  7             $RES/Resource[ends-with(DisplayName,".xsd")]'
  8             passing RES as "RES"
  9         )
10  /
/public/TXLIFE/TxLife/TxLife/TXLife2.18.02.xsd
/public/TXLIFE/TxLife/TxLife/XMLife2.18.02.xsd
/public/TXLIFE/TxLife/TxLife/XTbML2.18.02.xsd
/public/TXLIFE/TxLife/TxLife/XlifeBase2.18.02.xsd
Elapsed: 00:00:00.20
SQL> --
SQL> @@setTypeMappings
SQL> --
SQL> VAR SQLTYPE_MAPPINGS        CLOB;
SQL> --
SQL> begin
  2          :SQLTYPE_MAPPINGS     :=
  3  '<xdbpm:SQLTypeMappings xmlns:xdbpm="http://xmlns.oracle.com/xdb/xdbpm">
  4    <xdbpm:SQLTypeMapping>
  5           <xdbpm:xsdType>dateTime</xdbpm:xsdType>
  6           <xdbpm:SQLType>TIMESTAMP WITH TIME ZONE</xdbpm:SQLType>
  7    </xdbpm:SQLTypeMapping>
  8  </xdbpm:SQLTypeMappings>';
  9  end;
10  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01
SQL> --
SQL> begin
  2          :SQLTYPE_MAPPINGS     := XMLType(bfilename('&USERNAME','typeMapping.xml'),nls_charset_id('AL32UTF8')).getClobVal();
  3  end;
  4  /
old   2:        :SQLTYPE_MAPPINGS     := XMLType(bfilename('&USERNAME','typeMapping.xml'),nls_charset_id('AL32UTF8')).getClobVal();
new   2:        :SQLTYPE_MAPPINGS     := XMLType(bfilename('TXLIFE','typeMapping.xml'),nls_charset_id('AL32UTF8')).getClobVal();
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.03
SQL> --
SQL> select xmlType(:SQLTYPE_MAPPINGS)
  2    from dual
  3  /
<xdbpm:SQLTypeMappings xmlns:xdbpm="http://xmlns.oracle.com/xdb/xdbpm">
</xdbpm:SQLTypeMappings>
Elapsed: 00:00:00.01
SQL> begin
  2          if (:BINARY_XML is NULL) or (:BINARY_XML <> DBMS_XMLSCHEMA.REGISTER_BINARYXML) then
  3      XDB_EDIT_XMLSCHEMA.setSQLTypeMappings(XMLType(:SQLTYPE_MAPPINGS));
  4    end if;
  5  end;
  6  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01
SQL> --
SQL> --
SQL> @&TARGET_DIRECTORY/doSchemaRegistration
SQL> --
SQL> -- Schema Registration Script for XML Schemas in "/public/TXLIFE/TxLife" --
SQL> --
SQL> --
SQL> begin
  2    XDB_EDIT_XMLSCHEMA.getGroupDefinitions('/public/TXLIFE/TxLife');
  3  end;
  4  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.45
SQL> declare
  2    GENERIC_ERROR exception;
  3    PRAGMA EXCEPTION_INIT( GENERIC_ERROR , -31061 );
  4
  5    NO_MATCHING_NODES exception;
  6    PRAGMA EXCEPTION_INIT( NO_MATCHING_NODES , -64405 );
  7
  8    V_XML_SCHEMA XMLType       := xdburitype('/public/TXLIFE/TxLife/TxLife/XlifeBase2.18.02.xsd').getXML();
  9    V_SCHEMA_LOCATION_HINT VARCHAR2(700) := 'http://xmlns.ACORD.org/schemas/Life/2/TxLife/XlifeBase2.18.02.xsd';
10  begin
11    XDB_EDIT_XMLSCHEMA.expandGroups(V_XML_SCHEMA);
12    XDB_EDIT_XMLSCHEMA.applySQLTypeMappings(V_XML_SCHEMA);
13    begin
14      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
15    exception
16      when GENERIC_ERROR or NO_MATCHING_NODES then
17        NULL;
18      when OTHERS then
19        RAISE;
20    end;
21
22    begin
23      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
24    exception
25      when GENERIC_ERROR or NO_MATCHING_NODES then
26        NULL;
27      when OTHERS then
28        RAISE;
29    end;
30
31    XDB_EDIT_XMLSCHEMA.fixRelativeURLs(V_XML_SCHEMA,V_SCHEMA_LOCATION_HINT);
32
33    -- SQLType names for global complex types :-
34
59
60    -- SQLType names for global elements based on local complex types :-
61
62    DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XML_SCHEMA,'KeyValue',                                                   'KeyValue17787_T');
63    DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XML_SCHEMA,'OLifEExtension',                                             'OLifEExtension17782_T');
64    DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XML_SCHEMA,'PropertyValue',                                              'PropertyValue17792_T');
65
66    DBMS_XMLSCHEMA.registerSchema
67    (
68      SCHEMAURL => V_SCHEMA_LOCATION_HINT
69     ,SCHEMADOC => V_XML_SCHEMA
70     ,LOCAL      => TRUE
71     ,GENTYPES     => TRUE
72     ,GENTABLES     => TRUE
73     ,ENABLEHIERARCHY =>  DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
74    );
75  end;
76  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:02.26
SQL> declare
  2    GENERIC_ERROR exception;
  3    PRAGMA EXCEPTION_INIT( GENERIC_ERROR , -31061 );
  4
  5    NO_MATCHING_NODES exception;
  6    PRAGMA EXCEPTION_INIT( NO_MATCHING_NODES , -64405 );
  7
  8    V_XML_SCHEMA XMLType       := xdburitype('/public/TXLIFE/TxLife/TxLife/XTbML2.18.02.xsd').getXML();
  9    V_SCHEMA_LOCATION_HINT VARCHAR2(700) := 'http://xmlns.ACORD.org/schemas/Life/2/TxLife/XTbML2.18.02.xsd';
10  begin
11    XDB_EDIT_XMLSCHEMA.expandGroups(V_XML_SCHEMA);
12    XDB_EDIT_XMLSCHEMA.applySQLTypeMappings(V_XML_SCHEMA);
13    begin
14      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
15    exception
16      when GENERIC_ERROR or NO_MATCHING_NODES then
17        NULL;
18      when OTHERS then
19        RAISE;
20    end;
21
22    begin
23      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
24    exception
25      when GENERIC_ERROR or NO_MATCHING_NODES then
26        NULL;
27      when OTHERS then
28        RAISE;
29    end;
30
31    XDB_EDIT_XMLSCHEMA.fixRelativeURLs(V_XML_SCHEMA,V_SCHEMA_LOCATION_HINT);
32
33    -- SQLType names for global complex types :-
34
53
54        -- SQLType names for global elements based on local complex types :-
55
56    DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XML_SCHEMA,'Y',                                                          'Y17823_T');
57
58    DBMS_XMLSCHEMA.registerSchema
59    (
60      SCHEMAURL => V_SCHEMA_LOCATION_HINT
61     ,SCHEMADOC => V_XML_SCHEMA
62     ,LOCAL      => TRUE
63     ,GENTYPES     => TRUE
64     ,GENTABLES     => TRUE
65     ,ENABLEHIERARCHY =>  DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
66    );
67  end;
68  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:03.24
SQL> declare
  2    GENERIC_ERROR exception;
  3    PRAGMA EXCEPTION_INIT( GENERIC_ERROR , -31061 );
  4
  5    NO_MATCHING_NODES exception;
  6    PRAGMA EXCEPTION_INIT( NO_MATCHING_NODES , -64405 );
  7
  8    V_XML_SCHEMA XMLType       := xdburitype('/public/TXLIFE/TxLife/TxLife/XMLife2.18.02.xsd').getXML();
  9    V_SCHEMA_LOCATION_HINT VARCHAR2(700) := 'http://xmlns.ACORD.org/schemas/Life/2/TxLife/XMLife2.18.02.xsd';
10  begin
11    XDB_EDIT_XMLSCHEMA.expandGroups(V_XML_SCHEMA);
12    XDB_EDIT_XMLSCHEMA.applySQLTypeMappings(V_XML_SCHEMA);
13    begin
14      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
15    exception
16      when GENERIC_ERROR or NO_MATCHING_NODES then
17        NULL;
18      when OTHERS then
19        RAISE;
20    end;
21
22    begin
23      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
24    exception
25      when GENERIC_ERROR or NO_MATCHING_NODES then
26        NULL;
27      when OTHERS then
28        RAISE;
29    end;
30
31    XDB_EDIT_XMLSCHEMA.fixRelativeURLs(V_XML_SCHEMA,V_SCHEMA_LOCATION_HINT);
32
33    -- SQLType names for global complex types :-
34
838
839        -- Out-of-Line mappings for 1000 Column optimization :-
840
841    DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'Policy_Type',                                                          'Life',                                         'LIFE_TABLE');
842    DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'Holding_Type',                                                         'Policy',                                       'POLICY_TABLE');
843    DBMS_XMLSCHEMA.registerSchema
844    (
845      SCHEMAURL => V_SCHEMA_LOCATION_HINT
846     ,SCHEMADOC => V_XML_SCHEMA
847     ,LOCAL      => TRUE
848     ,GENTYPES     => TRUE
849     ,GENTABLES     => TRUE
850     ,ENABLEHIERARCHY =>  DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
851    );
852  end;
853  /
PL/SQL procedure successfully completed.
Elapsed: 02:12:40.05
SQL> declare
  2    GENERIC_ERROR exception;
  3    PRAGMA EXCEPTION_INIT( GENERIC_ERROR , -31061 );
  4
  5    NO_MATCHING_NODES exception;
  6    PRAGMA EXCEPTION_INIT( NO_MATCHING_NODES , -64405 );
  7
  8    V_XML_SCHEMA XMLType       := xdburitype('/public/TXLIFE/TxLife/TxLife/TXLife2.18.02.xsd').getXML();
  9    V_SCHEMA_LOCATION_HINT VARCHAR2(700) := 'http://xmlns.ACORD.org/schemas/Life/2/TxLife/TXLife2.18.02.xsd';
10  begin
11    XDB_EDIT_XMLSCHEMA.expandGroups(V_XML_SCHEMA);
12    XDB_EDIT_XMLSCHEMA.applySQLTypeMappings(V_XML_SCHEMA);
13    begin
14      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
15    exception
16      when GENERIC_ERROR or NO_MATCHING_NODES then
17        NULL;
18      when OTHERS then
19        RAISE;
20    end;
21
22    begin
23      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
24    exception
25      when GENERIC_ERROR or NO_MATCHING_NODES then
26        NULL;
27      when OTHERS then
28        RAISE;
29    end;
30
31    XDB_EDIT_XMLSCHEMA.fixRelativeURLs(V_XML_SCHEMA,V_SCHEMA_LOCATION_HINT);
32
33    -- SQLType names for global complex types :-
34
93
94        -- SQLType names for global elements based on local complex types :-
95
96    DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XML_SCHEMA,'VendorName',                                                 'VendorName19032_T');
97
98    DBMS_XMLSCHEMA.registerSchema
99    (
100      SCHEMAURL => V_SCHEMA_LOCATION_HINT
101     ,SCHEMADOC => V_XML_SCHEMA
102     ,LOCAL      => TRUE
103     ,GENTYPES     => TRUE
104     ,GENTABLES     => TRUE
105     ,ENABLEHIERARCHY =>  DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
106    );
107  end;
108  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:23.91
SQL>
SQL>
SQL> --
SQL> begin
  2          if (:BINARY_XML = DBMS_XMLSCHEMA.REGISTER_BINARYXML) then
  3      XDB_ANALYZE_SCHEMA.setSchemaRegistrationOptions(P_OPTIONS => DBMS_XMLSCHEMA.REGISTER_BINARYXML);
  4    end if;
  5    XDB_ANALYZE_SCHEMA.tableCreationScript(:TARGET_FOLDER, :TARGET_NAMESPACE);
  6  end;
  7  /
PL/SQL procedure successfully completed.
Elapsed: 00:02:05.74
SQL> set echo off
-- Table creation for namespace "http://ACORD.org/Standards/Life/2"
CREATE TABLE "TXLIFE_TABLE" of XMLTYPE
XMLTYPE STORE AS OBJECT RELATIONAL
XMLSCHEMA "http://xmlns.ACORD.org/schemas/Life/2/TxLife/TXLife2.18.02.xsd" ELEMENT "TXLife"
SQL> set verify on
SQL> set timing on
SQL> -
set pages 100 lines 256SQL> --
SQL> select TABLE_NAME
  2    from USER_XML_TABLES
  3   order by TABLE_NAME
  4  /
TABLE_NAME
ArrDestination19465_TAB
Attachment19139_TAB
Axis19114_TAB
CriteriaExpression19527_TAB
Key19113_TAB
LIFE_TABLE
LogicalExpression19304_TAB
MinBalanceCalcRule19399_TAB
POLICY_TABLE
9 rows selected.
Elapsed: 00:00:00.28
SQL> --
SQL> @&TARGET_DIRECTORY/doTableCreation
SQL> -- Table creation for namespace "http://ACORD.org/Standards/Life/2"
SQL>
SQL> CREATE TABLE "TXLIFE_TABLE" of XMLTYPE
  2  XMLTYPE STORE AS OBJECT RELATIONAL
  3  XMLSCHEMA "http://xmlns.ACORD.org/schemas/Life/2/TxLife/TXLife2.18.02.xsd" ELEMENT "TXLife"
  4  /
Table created.
Elapsed: 00:44:48.28
SQL>
SQL>
SQL>
SQL> --
SQL> set pages 100 lines 256
SQL> --
SQL> select TABLE_NAME
  2    from USER_XML_TABLES
  3   order by TABLE_NAME
  4  /
TABLE_NAME
ArrDestination19465_TAB
Attachment19139_TAB
Axis19114_TAB
CriteriaExpression19527_TAB
Key19113_TAB
LIFE_TABLE
LogicalExpression19304_TAB
MinBalanceCalcRule19399_TAB
POLICY_TABLE
TXLIFE_TABLE
10 rows selected.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
C:\xdb\schemas\ACORD\TxLife>sqlplus /nolog @doInsert
SQL*Plus: Release 11.2.0.2.0 Production on Fri Nov 26 19:21:04 2010
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
SQL> spool doInsert.log
SQL> --
SQL> def USERNAME = TXLIFE
SQL> --
SQL> def PASSWORD = &USERNAME
SQL> --
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> set autotrace on explain
SQL> --
SQL> set pages 50 lines 320 timing on
SQL> --
SQL> insert into TXLIFE_TABLE values (XMLTYPE(bfilename('&USERNAME','TXLife2.18.02.xml'),nls_charset_id('AL32UTF8')))
  2  /
old   1: insert into TXLIFE_TABLE values (XMLTYPE(bfilename('&USERNAME','TXLife2.18.02.xml'),nls_charset_id('AL32UTF8')))
new   1: insert into TXLIFE_TABLE values (XMLTYPE(bfilename('TXLIFE','TXLife2.18.02.xml'),nls_charset_id('AL32UTF8')))
1 row created.
Elapsed: 00:00:07.47
Execution Plan
Plan hash value: 1
| Id  | Operation                | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | INSERT STATEMENT         |              |     1 |   100 |     1   (0)| 00:00:01 |
|   1 |  LOAD TABLE CONVENTIONAL | TXLIFE_TABLE |       |       |            |          |
SQL> commit
  2  /
Commit complete.
Elapsed: 00:00:00.00
SQL> select t.*
  2    from TXLIFE_TABLE,
  3         XMLTABLE
  4         (
  5           xmlNamespaces
  6           (
  7             default 'http://ACORD.org/Standards/Life/2'
  8           ),
  9           'for $req in /TXLife/TXLifeRequest
10              for $criteria in $req/CriteriaExpression/Criteria
11                return $criteria'
12           passing OBJECT_VALUE
13           COLUMNS
14           PROPERTY_NAME  VARCHAR2(128) path 'PropertyName',
15           PROPERTY_VALUE VARCHAR2(128) path 'PropertyValue'
16         ) t
17  /
PROPERTY_NAME                                                                                                            PROPERTY_VALUE
LastName                                                                                                                 String
GovtID                                                                                                                   String
GovtIDTc                                                                                                                 String
ResidenceState                                                                                                           String
ActivityTypeCode                                                                                                         String
ActivityDescription                                                                                                      String
UserCode                                                                                                                 String
ActivityTypeCode                                                                                                         String
ActivityStatus                                                                                                           String
ActivityTypeCode                                                                                                         String
Closed                                                                                                                   String
Closed                                                                                                                   String
String                                                                                                                   String
13 rows selected.
Elapsed: 00:00:00.09
Execution Plan
Plan hash value: 2596235546
| Id  | Operation           | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT    |                                |    13 | 52572 |     7  (15)| 00:00:01 |
|*  1 |  HASH JOIN          |                                |    13 | 52572 |     7  (15)| 00:00:01 |
|   2 |   NESTED LOOPS      |                                |     2 |    60 |     3   (0)| 00:00:01 |
|   3 |    TABLE ACCESS FULL| SYS_NTxIzy/t2MTJi3su0dzM0wNA== |     2 |    40 |     3   (0)| 00:00:01 |
|*  4 |    INDEX UNIQUE SCAN| SYS_C00526537                  |     1 |    10 |     0   (0)| 00:00:01 |
|   5 |   TABLE ACCESS FULL | SYS_NT/uoSkJDrREukAxygzDQwUA== |    13 | 52182 |     3   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   1 - access("NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0013500136$")
   4 - access("NESTED_TABLE_ID"="TXLIFE_TABLE"."SYS_NC0004100042$")
Note
   - dynamic sampling used for this statement (level=2)
SQL>

Similar Messages

  • Does JMS parse xml content in TextMessages

              Hi
              I am working on WLS 6.1sp2 and I am using jms TextMessage type of message to
              send XML messages from one subsystem to another. I have added an XML registry
              for my version of XML parser. Now I do not have any entries for the entity declarations
              nor for the parser entries in the registry.
              When I send in an XML message in a TextMessage envelope I find the following
              errors in the log.
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve PUBLIC id. The root element is required in a well-formed docu
              ment.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve SYSTEM id. The root element is required in a well-formed docu
              ment.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve root tag. The root element is required in a well-formed docum
              ent.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Could not instantiate factory class
              specified in the Server console. Invalid parameters: at least one of publicId,
              s
              ystemId, rootTag must be non-null>
              [ChangeAwareClassLoader] : Name is : META-INF/services/org.apache.xerces.xni.par
              ser.XMLParserConfiguration
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
              to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
              r between the beginning of the document and its root element.>
              <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
              Failed to retrieve PUBLIC id. The root element is required in a well-formed docu
              ment.>
              Now from the logs I understand that the message is being parsed and since the
              parser does not find any PUBLIC ID or SYSTEM id it dumps the error, since I am
              using schemas there is none of the PUBLIC and SYSTEM ids in my xml, also this
              is not logged by any component of my subsystems, this is a weblogic XML Service
              log and when I trace through the code I find that it comes up after the first
              subsystem sends the message and before the second subsystem receives it.
              The question then is does JMS parse XML content in TextMessages and if so how
              can I disable that parsing?
              Thanks
              Sandeep
              

    JMS does not automatically parse TextMessages. Check the XML declaration in
              your application's deployment descriptors. That's often the source of this
              error.
              FYI, you can use XMLMessage for xml payloads. As far as I can remember, the
              XMLMessage is an extension of the TextMessage with xml parsing built in.
              Adarsh
              "Sandeep Nayak" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi
              >
              > I am working on WLS 6.1sp2 and I am using jms TextMessage type of message
              to
              > send XML messages from one subsystem to another. I have added an XML
              registry
              > for my version of XML parser. Now I do not have any entries for the entity
              declarations
              > nor for the parser entries in the registry.
              >
              > When I send in an XML message in a TextMessage envelope I find the
              following
              > errors in the log.
              >
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve PUBLIC id. The root element is required in a
              well-formed docu
              > ment.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve SYSTEM id. The root element is required in a
              well-formed docu
              > ment.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve root tag. The root element is required in a well-formed
              docum
              > ent.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Could not instantiate factory
              class
              > specified in the Server console. Invalid parameters: at least one of
              publicId,
              > s
              > ystemId, rootTag must be non-null>
              > [ChangeAwareClassLoader] : Name is :
              META-INF/services/org.apache.xerces.xni.par
              > ser.XMLParserConfiguration
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
              Failed
              > to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
              of cha
              > r between the beginning of the document and its root element.>
              > <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
              document.
              > Failed to retrieve PUBLIC id. The root element is required in a
              well-formed docu
              > ment.>
              >
              > Now from the logs I understand that the message is being parsed and since
              the
              > parser does not find any PUBLIC ID or SYSTEM id it dumps the error, since
              I am
              > using schemas there is none of the PUBLIC and SYSTEM ids in my xml, also
              this
              > is not logged by any component of my subsystems, this is a weblogic XML
              Service
              > log and when I trace through the code I find that it comes up after the
              first
              > subsystem sends the message and before the second subsystem receives it.
              >
              > The question then is does JMS parse XML content in TextMessages and if so
              how
              > can I disable that parsing?
              >
              > Thanks
              >
              > Sandeep
              

  • Performance question on small XML content but with large volume

    Hi all,
    I am new to Berkeley XML DB.
    I have the following simple XML content:
    <s:scxml xmlns:s="http://www.w3.org/2005/07/scxml">
    <s:state id="a"/>
    <s:state id="b"/>
    <s:state id="c"/>
    </s:scxml>
    about 1.5K bytes each but the total number of such content is large (5 million+ records).
    This is a typical query:
    query 'count(collection("test.dbxml")/s:scxml/s:state[@id="a"]/following-sibling::s:state[@id="e"])'
    where the id attribute is used heavily.
    I've tested with about 10000 records with the following indexes:
    Index: edge-attribute-equality-string for node {}:id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    Index: edge-element-presence-none for node {}:scxml
    Index: edge-element-presence-none for node {}:state
    but the query took just under one minute to complete. Is this the expected performance? It seems slow. Is there anyway to speed it up?
    In addition, the total size of the XML content is about 12M but ~100M of data is generated with the log.xxxxxxxxxx files. Is this expected?
    Thanks.

    Hi Ron,
    Yes, I've noticed the URI issue after sending the post and changed them to:
    dbxml> listindex
    Default Index: none
    Index: edge-attribute-equality-string for node {http://www.w3.org/2005/07/scxml}
    :id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
    002/dbxml}:name
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:scx
    ml
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:sta
    te
    5 indexes found.
    I added more records (total ~30000) but the query still took ~1 minute and 20 seconds to run. Here is the query plan:
    dbxml> queryplan 'count(collection("test.dbxml")/s:scxml/s:state[@id="start"]/fo
    llowing-sibling::s:state[@id="TryToTransfer"])'
    <XQuery>
    <Function name="{http://www.w3.org/2005/xpath-functions}:count">
    <DocumentOrder>
    <DbXmlNav>
    <QueryPlanFunction result="collection" container="test.dbxml">
    <OQPlan>n(P(edge-element-presence-none,=,root:http://www.sleepycat.com
    /2002/dbxml.scxml:http://www.w3.org/2005/07/scxml),P(edge-element-presence-none,
    =,scxml:http://www.w3.org/2005/07/scxml.state:http://www.w3.org/2005/07/scxml))<
    /OQPlan>
    </QueryPlanFunction>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="scxml" nodeType="element"/>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="start" typeuri="http://www.w3.org
    /2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    <DbXmlStep axis="following-sibling" prefix="s" uri="http://www.w3.org/20
    05/07/scxml" name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="TryToTransfer" typeuri="http://ww
    w.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    </DbXmlNav>
    </DocumentOrder>
    </Function>
    </XQuery>
    I've noticed the indexes with URI were not used so I added back the indexes without URI:
    dbxml> listindex
    Default Index: none
    Index: edge-attribute-equality-string for node {}:id
    Index: edge-attribute-equality-string for node {http://www.w3.org/2005/07/scxml}
    :id
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2
    002/dbxml}:name
    Index: edge-element-presence-none for node {}:scxml
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:scx
    ml
    Index: edge-element-presence-none for node {}:state
    Index: edge-element-presence-none for node {http://www.w3.org/2005/07/scxml}:sta
    te
    8 indexes found.
    Here is the query plan with the above indexes:
    dbxml> queryplan 'count(collection("test.dbxml")/s:scxml/s:state[@id="start"]/fo
    llowing-sibling::s:state[@id="TryToTransfer"])'
    <XQuery>
    <Function name="{http://www.w3.org/2005/xpath-functions}:count">
    <DocumentOrder>
    <DbXmlNav>
    <QueryPlanFunction result="collection" container="test.dbxml">
    <OQPlan>n(P(edge-element-presence-none,=,root:http://www.sleepycat.com
    /2002/dbxml.scxml:http://www.w3.org/2005/07/scxml),P(edge-element-presence-none,
    =,scxml:http://www.w3.org/2005/07/scxml.state:http://www.w3.org/2005/07/scxml),V
    (edge-attribute-equality-string,state:http://www.w3.org/2005/07/scxml.@id,=,'sta
    rt'),V(edge-attribute-equality-string,state:http://www.w3.org/2005/07/scxml.@id,
    =,'TryToTransfer'))</OQPlan>
    </QueryPlanFunction>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="scxml" nodeType="element"/>
    <DbXmlStep axis="child" prefix="s" uri="http://www.w3.org/2005/07/scxml"
    name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="start" typeuri="http://www.w3.org
    /2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    <DbXmlStep axis="following-sibling" prefix="s" uri="http://www.w3.org/20
    05/07/scxml" name="state" nodeType="element"/>
    <DbXmlFilter>
    <DbXmlCompare name="equal" join="attribute" name="id" nodeType="attrib
    ute">
    <Sequence>
    <AnyAtomicTypeConstructor value="TryToTransfer" typeuri="http://ww
    w.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlCompare>
    </DbXmlFilter>
    </DbXmlNav>
    </DocumentOrder>
    </Function>
    </XQuery>
    The indexes are used in this case and the execution time was reduced to about 40 seconds. I set the namespace with setNamespace when the session is created. Is this the reason why the indexes without URI are used?
    Any other performance improvement hints?
    Thanks,
    Ken

  • Business Intelligence and Analysis capabilities on XML content

    On page 99 of Oracle XML DB Basic Demonstration pdf doc it si said: "Even though Business Intelligence, such as rollup and cube, are not XML aware they are able to process XML content exposed through a relational view"
    is this true ? if so, how can i create a cube and/or
    dimension from XML content exposed through a relational view ?
    Unfortunately, Oracle 9i does not allow me to build materialzed views from XML content (Oracle objects)
    Thanks in advance,

    The intention of the documentation maybe that anything you can query using SQL, you can expose as XML. For instance, you could create an analytic workspace, expose it through views, query the views through SQL, and return the results as XML.

  • Business Intelligent and Analysis capabilities on XML content

    On page 99 of Oracle XML DB Basic Demonstration pdf doc it si said: "Even though Business Intelligence, such as rollup and cube, are not XML aware they are able to process XML content exposed through a relational view"
    is this true ? if so, how can i create a cube and/or
    dimension from XML content exposed through a relational view ?
    Unfortunately, Oracle 9i does not allow me to build materialzed views from XML content (Oracle objects)
    Thanks in advance,

    Thanks for your reply,
    The problem is that Oracle 9i, as far as i know, cannot build materialized views from XML data. The only thing i've been able to achieve are simple relational views and indexes.
    So, is it possible to build DW structures (cubes, dimensions,hierarchies, etc) using Oracle 9i from standard views instead of tables ? I believe not (or at least i haven't been able to)
    Thanks again

  • Can someone plz confirm me that how i can change or update the security questions related to my apple id? as i have been never put them since i create my apple id but now due to some security reasons its asking me again and again the answers. i am unable

    can someone plz confirm me that how i can change or update the security questions related to my apple id? as i have been never put them since i create my apple id but now due to some security reasons its asking me again and again the answers. i am unable to go through the process. thanks.

    Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities

  • Efficient way for Continous Creation of XML Content?

    Hi
    I have a requirement of creating xml content from the data extraced from a udp packet.
    As the packet arrives, i have to generate appropriate xml content from them and keep in the same single xml file.
    Problem:
    Since the xml file is not a flat file, i can't just append the new contents at the end. So if i have to write into xml file, Each and Every time i have to parse the content as a packet arrives and insert the new content under appropriate parent. I think this is not the most efficient way.
    Every time parsing the file may affect cpu time and as the file grows in size, the memory will also be a constraint.
    Other options i could think of
    * Hold the XML Document Object in memory until a certain event like timeout for receiving packet and write into the xml file at oneshot.
    * Serialize the objects containing the extracted packet content to a temp file and after some event, parse and create the xml file at oneshot
    Which is the efficient way or is there any design pattern to handle this situation? I am worried about the memory footprint and performance on peak loads
    I am planning to use JDOM / SAX Builder for xml creation.
    Thank you...

    Lot's of "maybe" and "I think" and "I'm worried about" in that question, and no "I have found" or "it is the case that". In short, you're worrying too much about problems you don't even know you have. XML is a verbose format anyway, efficiency isn't paramount when dealing with it. Even modestly powered machines can deal with quite a lot of disk I/O these days without noticeable impact. The most efficient thing you can do here is write something that works, and see if you can live with the performance

  • Pass parameter through standard page "import xml content and actions"

    Dear Portal experts,
    As you know, a standard portal page is configured to allow the import of XML file. It is located in the portal in the path system admin -> transport -> xml content and actions -> import
    I configured a quick link u201Cimportu201D to the page so now the link http://myserver:port/irj/portal/import allows me to access directly to this screen.
    What I would like to do now is to pass the parameter related to u201Cfile nameu201D through this screen meaning that I would like that http://myserver:port/irj/portal/ import/filename=C:\test.xml  fills automatically the fields u201CXML fileu201D with  C:\test.xml 
    Please do you know how to achieve this ?
    Thank you very much and regards

    hi,
    @Maksim :
    When user launch an URL like http://myserver:port/irj/portal/ import/*filename=C:\test.xml, he is requested to provide username and password; as this link is a shortcut for the upload xml page, there is a check of authorization and only portal admin that have authorization and permission on this page/iview will be able to upload xml file through the URL. Hope this clarify.
    @Kumar :
    thank you for your answer. What a pity to not be able to pass parameter through standard portal page/iview particularly knowing that we can pass paramater through many kinds of iviews (transactional iview, url iview, VC iview...). I explored some option on file com.sap.portal.ivs.init.par but this was unsuccessful. However, thanks to this [link bellow|http://wiki.sdn.sap.com/wiki/display/Snippets/ComponenttouploadXMLfilewithPCD+objects], I was able to upload through URL the XML file.
    The problem is that I can upload only XML file that are stored in the server not in the local user computer. My requirement is to be able to upload local XML file stored on user's computer.
    If someone could provide and idea/solution, I would be very grateful.
    Cheers

  • Message processing failed in XML parser

    This is IDoc to file integration. When I test (WE19), I did not put any value in the 'Quantity' field (which is 6 characters long).In the message mapping I put a condition to see if the value is empty then put zero, and it did not give any error. I have given all the fixed field lengths in the file adapter but still getting the following error:
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Column value 'TABLERO DE CONTROL' too long (>6 for 2. column) - must stop', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Column value 'TABLERO DE CONTROL' too long (>6 for 2. column) - must stop', probably configuration error in file adapter (XML parser error)'

    When I enter value in the 'Quantity' field, the integration works fine. The value 'tablero de control' is the 'Description'  which is the next field. My Content Conversion is like;
    Field1, Field2, Quantity, Description
    (where Field1 and Field2 are mandatory and Quantity and Description are optional)
    When I provide all 4 values, the integration work just fine, when I do not provide 'Quantity' it fails.

  • Post processing PDF to XML.

    Topic
    Post-processing PDF into XML.
    Compton MacKenzie - 08:48am Oct 29, 2008 Pacific
    Hi,
    Sorry for the basic question... We want to have users fill out a fillable PDF form using Aacrobat Reader and then upload it to a web page. Once we get the PDF, we need to extract the data that they have entered. Short of using LiveCycle Data Services (not currently feasible as we have no Java presence on our server platform), is there any API that I can use to extract the data or convert the PDF to XML. I understand that it is possible to export XML using the Acrobat client (and it might be possible to script this with COM) but I don't think this would work reliably in a server environment.
    (We need both the PDF and the data as the PDF will contain an electronically captured image of a customer's signature and need to preserve the actual image of the document.)
    Any suggestions?
    Thanks!

    There are server based products under the LiveCycle banner for this but they all run on a Java based app server. You can use a turn key install where the app server (JBoss) and a Database (MySql) are provided for you but you need to have the Java SDK present. The LiveCycle servers can run on Windows, Linux, AIX to name a few.
    Note that if you script Acrobat to do this on the server you are in violation of your license agreement.

  • How to remove actual XML content from Weather Web Service Client's standard output?

    Hi,
    I tried web service example examples.webservices.rpc.weatherEJB.Weather with WLS6.1,
    it works fine, but on client side, ( either Client or DClient ), I always see
    the actual XML content being sent and received from standard output, like
    "------------- RECEIVING XML -------------", and I can't find any related System.out.println
    statement in client source code, Please explain how to remove it, may there is
    a configurable parameter for this? any help will be highly appreciated.
    Thanks
    Naichen

    Hi Naichen,
    To suppress showing the actual SOAP request and response going to standard out,
    change the following line in the Client.java:
    h.put("weblogic.soap.verbose", "true" );
    to read:
    h.put("weblogic.soap.verbose", "false" );
    Regards,
    Mike Wooten
    "Naichen Liu" <[email protected]> wrote:
    >
    Hi,
    I tried web service example examples.webservices.rpc.weatherEJB.Weather
    with WLS6.1,
    it works fine, but on client side, ( either Client or DClient ), I always
    see
    the actual XML content being sent and received from standard output,
    like
    "------------- RECEIVING XML -------------", and I can't find any related
    System.out.println
    statement in client source code, Please explain how to remove it, may
    there is
    a configurable parameter for this? any help will be highly appreciated.
    Thanks
    Naichen

  • Mount-DiskImage in a remote session exeception- Cannot process Cmdlet Definition XML for the following file:

    Hi everybody,
    I have a strange problem with Mount-DiskImage command.
    Environment: Windows server 2012 without any updates.
    All scripts signed as it was in Hanselman's blogpost
    http://www.hanselman.com/blog/SigningPowerShellScripts.aspx
    First script(script1) executing on one machine (server1), then copy another script(script2) to the remote server(server2) and run script2 in a PS-Session. Both are signed. Certificates are located on both servers.
    In a script I tried to
     Import-Module Storage
     $mountVolume = Mount-DiskImage -ImagePath $ImageSourcePath -PassThru
    where ImageSourcePath is a networkpath to iso image.
    But getting exception.
    Exception Text:
    Cannot process Cmdlet Definition XML for the following file:
    C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Storage\Disk.cdxml. At line:138 char:17
    +                 $__cmdletization_objectModelWrapper = Microsoft.PowerShell.Utili ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Executable script code found in signature block.
    At line:139 char:17
    +                 $__cmdletization_objectModelWrapper.Initialize($PSCmdlet, $scrip ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Executable script code found in signature block.
    At line:143 char:21
    When I look into the C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Storage\Disk.cdxml I didn't get what's happend, because in line 138- was xml comment.
    Any ideas?

    Hi,
    I suggest referring to the following links:
    http://blogs.msdn.com/b/san/archive/2012/09/21/iso-mounting-scenarios.aspx
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/15/oct-15-blog.aspx
    Best Regards,
    Vincent Wu
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • XML content in MHP-Xlet

    Hello!
    I am working on a MHP-application that contacts a server and loads an XML-file, but I have problems, sorting and displaying the XML-content in my Xlet.
    I am using nanoXML to parse the file and via the debug-output of my STB (or the IRT-SW-box) I can see, that this is succesful - but I have no idea how to fill a text-area with the content of my XML-file.
    Has anybody done something like that? And is it possible to write XML-files on a server via the back channel? Maybe with FTP?
    Thanks a lot!

    To answer the other part of the question, it is possible to write files to a server over the return channel. You will need to implement the protocol yourself, however, so in the FTP example you would have to include a simple FTP client in your application.
    Depending on your needs, you may want something more secure than FTP, but this is obviously a design decision for your project.
    Steve

  • Extracting xml content in a XMLTYPE VIEW

    Experts:
    I need to create an xmltype view based on the following xml content.
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <EMPLOYEES CREATED="2013-02-06T12:33:00" xsi:noNamespaceSchemaLocation="http://supporthtml.oracle.com/TEST_SCHEMA.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <EMPLOYEE_TRANS MODE="A" emp_id="1">
      <emp_nm>SCOTT</emp_nm>
      <emp_dept>FN</emp_dept>
      <mgr>DON</mgr>
      <sal>4000</sal>
      <updt_ts>2013-02-06T12:28:00</updt_ts>
      </EMPLOYEE_TRANS>
    <EMPLOYEE_TRANS MODE="A" emp_id="2">
      <emp_nm>KEVIN</emp_nm>
      <emp_dept>HR</emp_dept>
      <mgr>MIKE</mgr>
      <sal>3000</sal>
      <updt_ts>2013-02-06T12:29:00</updt_ts>
      </EMPLOYEE_TRANS>
    </EMPLOYEES>I want to run a select statement againt this view which can give me column data in this format.
    This xml is already stored in an Oracle XMLTYPE Object Relation table which conforms to a registered xsd schema document.
    select CREATED, MODE, EMP_ID, emp_nm, emp_dept, mgr, sal, updt_ts from employees_view.
    Result:
    2013-02-06T12:33:00 A 1 SCOTT FN DON  4000 2013-02-06T12:28:00
    2013-02-06T12:33:00 A 2 KEVIN HR MIKE 3000 2013-02-06T12:29:00How can I achieve this? I tried by getting various errors. I would appreciate if someone can send me a sample
    11.2.0.3
    Linux
    XMLDBThanks
    Kevin
    Edited by: Kevin_K on Feb 6, 2013 9:54 AM
    Edited by: Kevin_K on Feb 6, 2013 9:55 AM

    I guess the above makes a regular relational view? correct?Yes.
    How can I extract the of CREATED attribute from the top most employees element and attributes "MODE" and "emp_id" from EMPLOYEE_TRANS element ? You have to use a two-level approach :
    SQL> select x1.created, x2.*
      2  from EMPLOYEES_OR_TABLE t
      3     , xmltable('/EMPLOYEES'
      4         passing t.object_value
      5         columns created timestamp path '@CREATED'
      6               , emps    xmltype   path 'EMPLOYEE_TRANS'
      7       ) x1
      8     , xmltable('/EMPLOYEE_TRANS'
      9         passing x1.emps
    10         columns emp_mode varchar2(1)  path '@MODE'
    11               , emp_id   number       path '@emp_id'
    12               , emp_nm   varchar2(30) path 'emp_nm'
    13               , updt_ts  timestamp    path 'updt_ts'
    14       ) x2 ;
    CREATED                     EMP_MODE     EMP_ID EMP_NM                         UPDT_TS
    06/02/13 12:33:00,000000    A                 1 SCOTT                          06/02/13 12:28:00,000000
    06/02/13 12:33:00,000000    A                 2 KEVIN                          06/02/13 12:29:00,000000
    The first XMLTable x1 extracts top-level information, then passes the collection of EMPLOYEE_TRANS elements to a second XMLTable that breaks each item in separate rows and columns.
    It's also possible to use a single XMLTable, but with a little more complex XQuery expression.

  • Using Views to access XML Content

    I was wondering if anyone can help me in these questions.
    I created a view to access XML Content in the database for reports. My first question is I have 18 properties in the xml document but when I created the view I only retrieve one property information. What dO I need to change in my XPath query to get all the properties see script below
    CREATE OR REPLACE VIEW AHA_PMCO_BUILDINGS_VIEW
    (BUILDINGID,NUMBEROFFLOORS, CONSTRUCTIONDATE,NAME, BUILDINGTYPE, DEMODISPODATE,MODSTARTDATE,MODENDDATE, ISANNEX) as
    select extractValue(value(p),'/Building/@Id'),
         extractValue(value(p),'/Building/@NumberOfFloors'),
         extractValue(value(p),'/Building/@ConstructionDate'),
         extractValue(value(p),'/Building/@Name'),
         extractValue(value(p),'/Building/@BuildingType'),
         extractValue(value(p),'/Building/@DemolitionDispositionDate'),
         extractValue(value(p),'/Building/@ModernizationStartDate'),
         extractValue(value(p),'/Building/@ModernizationEndDate'),
         extractValue(value(p),'/Building/@IsAnnex')
    from "Pmco438_TAB" X, TABLE(xmlsequence (extract(value(X), '/Pmco/Properties[1]/Property[1]/Buildings/Building')) ) p;
    How do I change my script to retrieve multiple properties instead of just one property
    Thanks
    Dibor

    Hi Paul
    I have access to all the documents (JavaScript via Mozilla, Adobe JavaScript API, XFA API etc etc) but none are specific enough to cater for this issue.  I will work this out before too long but it would be very useful if someone who had done this already could shortcut my journey!
    Thanks
    Roxy

Maybe you are looking for

  • Hello! can I use a DVI to video adapter cable from my macbook to a 60 inch CRT TV?!

    Just got the TV tonight and connected my DVI cable. now I know the cable works because I used it on a MUCH smaller TV but this one is obviously enormous. I got the image to appear, it was just real blurry and crazy. is there a display setting that I

  • Do I have to own a apple device to use iCloud on my Windows 7 PC

    I do not own an Apple device seemly to utlizie iCould I must initially own one before being able to use on my Windows PC with Outlook 2010?

  • HP G60-637CL laptop NO SOUND AFTER DOWN WINDOW 8.1 PRO

    I need assistance on my notebook, after downloading Window 8.1 pro, I have no sound on my notebook

  • Issue with table index

    Hi All, Hope you are all well. Strange issue here: We have a Custom ABAP program that reads from mainly Table EKKO. On My QAS system the program works 100%, when i do a SQL Trace (ST05) i can see in the execution plan that it is using the correct ind

  • Objects alv grid

    Hi, I need to avoid the displaying the Crystal Report Functionality which is present in the drop down functionality of Excel Icon on ALV grid using object methods . Am using call method grid1->set_table_for_first_display        exporting