XML list XML index to 0 knots

I added a bit of XML primitive to my existing XML file.

The XML looks like this

<special>
  <name><![CDATA[1st Special]]></name>
  <price>10</price>
  <image>http://localhost/rackets/wilson.gif</image>
  <propimage>http://localhost/rackets/wilson.gif</propimage>
</special>
<special>
  <name><![CDATA[2nd Special]]></name>
  <price>10</price>
  <image>http://localhost/rackets/wilson.gif</image>
  <propimage>http://localhost/rackets/wilson.gif</propimage>
</special>
<special>
  <name><![CDATA[3rd Special]]></name>
  <price>10</price>
  <image>http://localhost/rackets/wilson.gif</image>
  <propimage>http://localhost/rackets/wilson.gif</propimage>
</special>
<special>
  <name><![CDATA[4th Special]]></name>
  <price>10</price>
  <image>http://localhost/rackets/wilson.gif</image>
  <propimage>http://localhost/rackets/wilson.gif</propimage>
</special>

When I try to iterate over the nodes after assigning each special node in an XML list, it fails when I check, it seems he only sees at index 0. Rather than 0, 1, 2, 3. I know that I can use a for each loop on this, but the problem is that I think I should be able to distinquish between the various nodes

          private function specialProcess(x:XMLList):void {
               var specialsObject:Object;
               var specialsList:XMLList;
               var specList:XMLList;
               var dataCopy:XMLList;
               dataCopy = x;
               for (var a:int = 0; a < 4; a++) {
                    specialsObject = {
                         specials: []
                    }
                    specialsList = dataCopy[a].special;
               trace(specialsList[0]);
          }
          }

Thanks in advance

Try this:

private void specialProcess(list:XMLList):void {}
var specialsObject:Object;
var specialsList:XML;
var specList:XMLList;
var dataCopy:XMLList;
dataCopy = list;
for (var a: int = 0; a)< 4;="" a++)="">
specialsObject = {}
[promotions:]
}
specialsList = dataCopy [a];
trace (a + ":" + specialsList.children () [0]);
}
}

Tags: Adobe Animate

Similar Questions

  • Dialog box States: the document is not valid. The xml index file is missing. What should I do?

    Tried to open a file of numbers. Dialog box shows: the invalid document___is. The xml index file is missing. I can retrieve this file? Suggestions?

    Yes, all you have to do is probably make sure you run the version of numbers which is located in your main Applications folder and open the document with this version.  Probably, you try to open it with the old version of numbers.

    SG

  • Path to XML index table is full table scan

    Hi all

    I have a version of oracle 11.2.0.4.6 database

    Try to implement partitioning on XML indexes.

    Creates a table and index partitioned by time stamp as below.

    Whenever I'm trying to find the path table makes a full table scan.

    I have applied the fix as indicated ( Doc ID 13522189.8 ).

    So the recovery is quite slow and partition pruning does not not on XML indexes.

    Wondering if anyone has experienced the same problem?

    CREATE TABLE INCIDENT

    (

    INCIDENT_PK NUMBER (14.5).

    INCIDENTGROUPING_PK NUMBER (14.5).

    INCIDENTTYPE_PK NUMBER (14.5).

    SECURITYCLASS_PK NUMBER (14.5).

    STAMP OF INCIDENT_DATE,

    SYS INCIDENT_DETAIL. XMLTYPE

    )

    TABLESPACE DATA_TBS_INCIDENT

    PCTUSED 0

    PCTFREE 10

    INITRANS 1

    MAXTRANS 255

    STORAGE)

    64K INITIALS

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    )

    LOGGING

    NOCOMPRESS

    PARTITION BY RANGE (INCIDENT_DATE)

    (PARTITION SEP2013_WEEK1 VALUES LESS THAN (to_timestamp (' 00:00:00.00 2013-09-08 ',' YYYY-MM-DD HH24:MI:SS.))) FF2')),

    PARTITION SEP2013_WEEK2 VALUES LESS THAN (to_timestamp ('2013-09-15 00:00:00.00 ',' YYYY-MM-DD HH24:MI:SS.)) FF2')),

    PARTITION SEP2013_WEEK3 VALUES LESS THAN (to_timestamp ('2013-09-22 00:00:00.00 ',' YYYY-MM-DD HH24:MI:SS.)) FF2')),

    ..........);

    CREATE the INDEX INCIDENTxdb_idx

    ON corpaudlive. INCIDENT (INCIDENT_detail) INDEXTYPE IS XDB. LOCAL XMLINDEX 10 PARALLEL

    PARAMETERS (' PATH TABLE INCIDENT_PATHTABLE (TABLESPACE DATA_TBS_INCIDENT))

    PIKEY INDEX INCIDENT_PATHTABLE_PIKEY_IX (TABLESPACE IDX_TBS_INCIDENT)

    PATH ID INDEX INCIDENT_PATHTABLE_ID_IX (TABLESPACE IDX_TBS_INCIDENT)

    INCIDENT_PATHTABLE_VALUE_IX VALUE INDEX (TABLESPACE IDX_TBS_INCIDENT)

    ORDER KEY INDEX INCIDENT_PATHTABLE_KEY_IX (TABLESPACE IDX_TBS_INCIDENT)

    Paths (INCLUDE (//forename //surname //postcode //dateofbirth //street //town))');

    SQL > explain the plan for

    2 Select INCIDENT_pk in INCIDENT where XMLEXISTS ('/ / name [text () = 'john']' by the way of INCIDENT_detail)

    3 and XMLEXISTS ("/ / name [text () 'clark' =]' by the way of INCIDENT_detail")

    4 and a.INCIDENT_date between TO_TIMESTAMP (January 10, 2014 ',' DD/MM/YYYY "")

    5 and TO_TIMESTAMP (September 10, 2014 ',' DD/MM/YYYY ');

    He explained.

    Elapsed time: 00:00:02.77

    SQL > select * from table (dbms_xplan.display);

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Hash value of plan: 123057549

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    | ID | Operation                                       | Name                           | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |    TQ | IN-OUT | PQ Distrib.

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                                |     1.    70.  1803 (5) | 00:00:22 |       |       |        |      |            |

    |   1.  COORDINATOR OF PX |                                |       |       |            |          |       |       |        |      |            |

    |   2.   PX SEND QC (RANDOM). : TQ10003 |     1.    70.  1803 (5) | 00:00:22 |       |       |  Q1, 03 | P > S | QC (RAND) |

    |   3.    SEMI NESTED LOOPS.                                |     1.    70.  1803 (5) | 00:00:22 |       |       |  Q1, 03 | SVCP |            |

    |   4.     NESTED LOOPS |                                |     1.    57.  1800 (5) | 00:00:22 |       |       |  Q1, 03 | SVCP |            |

    |   5.      VIEW                                       | VW_SQ_1                        |   239.  5975 |  1773 (5) | 00:00:22 |       |       |  Q1, 03 | SVCP |            |

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    |   6.       UNIQUE HASH |                                |   239. 25334 |            |          |       |       |  Q1, 03 | SVCP |            |

    |   7.        RECEIVE PX |                                |   239. 25334 |            |          |       |       |  Q1, 03 | SVCP |            |

    |   8.         PX SEND HASH | : TQ10002 |   239. 25334 |            |          |       |       |  Q1, 02 | P > P | HASH |

    |   9.          UNIQUE HASH |                                |   239. 25334 |            |          |       |       |  Q1, 02 | SVCP |            |

    | * 10 |           HASH JOIN |                                |   239. 25334 |  1773 (5) | 00:00:22 |       |       |  Q1, 02 | SVCP |            |

    |  11.            KIND OF BUFFER.                                |       |       |            |          |       |       |  Q1, 02 | ISSUE |            |

    |  12.             RECEIVE PX |                                |     1.    22.     3 (0) | 00:00:01 |       |       |  Q1, 02 | SVCP |            |

    |  13.              PX SEND BROADCAST | : TQ10000 |     1.    22.     3 (0) | 00:00:01 |       |       |        | S > P | BROADCAST |

    |  14.               TABLE ACCESS BY INDEX ROWID | X$ PT74MSS0WBH028JE0GUCLBK0LHM4 |     1.    22.     3 (0) | 00:00:01 |       |       |        |      |            |

    | * 15 |                INDEX RANGE SCAN | X$ PR74MSS0WBH028JE0GUCLBK0LHM4 |     1.       |     2 (0) | 00:00:01 |       |       |        |      |            |

    | * 16.            HASH JOIN |                                | 12077 |   990K |  1770 (5) | 00:00:22 |       |       |  Q1, 02 | SVCP |            |

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    |  17.             RECEIVE PX |                                |   250K |    10 M |    39 (0) | 00:00:01 |       |       |  Q1, 02 | SVCP |            |

    |  18.              PX SEND BROADCAST | : TQ10001 |   250K |    10 M |    39 (0) | 00:00:01 |       |       |  Q1, 01 | P > P | BROADCAST |

    |  19.               SYSTEM PARTITION ALL |                                |   250K |    10 M |    39 (0) | 00:00:01 |     1.   112.  Q1, 01 | ISSUE |            |

    | * 20.                TABLE ACCESS BY LOCAL INDEX ROWID | INCIDENT_PATHTABLE |   250K |    10 M |    39 (0) | 00:00:01 |     1.   112.  Q1, 01 | SVCP |            |

    | * 21.                 INDEX RANGE SCAN | INCIDENT_PATHTABLE_VALUE_IX |   161.       |    25 (0) | 00:00:01 |     1.   112.  Q1, 01 | SVCP |            |

    |  22.             ITERATOR BLOCK PX |                                |   221 M |  8865M |  1671 (1) | 00:00:21 |    53.    54.  Q1, 02 | ISSUE |            |

    | * 23.              TABLE ACCESS FULL | INCIDENT_PATHTABLE |   221 M |  8865M |  1671 (1) | 00:00:21 |    53.    54.  Q1, 02 | SVCP |            |

    | * 24.      TABLE ACCESS BY ROWID USER | INCIDENT |     1.    32.     1 (0) | 00:00:01 | ROWID | ROWID |  Q1, 03 | SVCP |            |

    | * 25.     SEE PUSHED PREDICATE. VW_SQ_2                        |     1.    13.    20 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    |  26.      NESTED LOOPS |                                |     1.   106.    20 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    |  27.       NESTED LOOPS |                                |     4.   106.    20 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    |  28.        NESTED LOOPS |                                |     4.   256.     8 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    |  29.         TABLE ACCESS BY INDEX ROWID | X$ PT74MSS0WBH028JE0GUCLBK0LHM4 |     1.    22.     3 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    | * 30 |          INDEX RANGE SCAN | X$ PR74MSS0WBH028JE0GUCLBK0LHM4 |     1.       |     2 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    |  31.         ITERATOR SYSTEM PARTITION.                                |     4.   168.     5 (0) | 00:00:01 |    53.    54.  Q1, 03 | SVCP |            |

    | * 32 |          TABLE ACCESS BY LOCAL INDEX ROWID | INCIDENT_PATHTABLE |     4.   168.     5 (0) | 00:00:01 |    53.    54.  Q1, 03 | SVCP |            |

    | * 33 |           INDEX RANGE SCAN | INCIDENT_PATHTABLE_PIKEY_IX |     4.       |     4 (0) | 00:00:01 |    53.    54.  Q1, 03 | SVCP |            |

    |  34.        ITERATOR SYSTEM PARTITION.                                |     1.       |     2 (0) | 00:00:01 |   KEY |   KEY |  Q1, 03 | SVCP |            |

    | * 35 |         INDEX RANGE SCAN | INCIDENT_PATHTABLE_KEY_IX |     1.       |     2 (0) | 00:00:01 |   KEY |   KEY |  Q1, 03 | SVCP |            |

    | * 36 |       TABLE ACCESS BY LOCAL INDEX ROWID | INCIDENT_PATHTABLE |     1.    42.     3 (0) | 00:00:01 |     1.     1.  Q1, 03 | SVCP |            |

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    10 - access("SYS_P9".") PATHID '=' ID')

    Access (SYS_PATH_REVERSE ("PATH") 15 - > = HEXTORAW ('02582E') AND SYS_PATH_REVERSE ("PATH") < HEXTORAW ('02582EFF'))

    16 - access("SYS_P11".") RID "IS 'SYS_P9'." GET RID OF"AND TBL$ OR$ IDX$ PART$ NUM ("CORPAUDLIVE". "THE INCIDENT", 0,7,65535, "SYS_P9" "." " "RID") = TBL$ OR$ IDX$ PART$ NUM ("CORPAUDLIVE". "INCIDENT_PATHTAB

    THE', 0,7,65535, ROWID))

    filter ("SYS_P9". "ORDER_KEY" < = 'SYS_P11' "." " ORDER_KEY' AND 'SYS_P11 '. "" ORDER_KEY "< SYS_ORDERKEY_MAXCHILD ("SYS_P9". "ORDER_KEY")) "

    20 filter (SYS_XMLI_LOC_ISTEXT ("SYS_P11". "LOCATOR", "SYS_P11" "." " PATHID') = 1)

    21 - access("SYS_P11".") The VALUE "= 'John')

    23 filter (SYS_XMLI_LOC_ISNODE ("SYS_P9". "LOCATOR") = 1 AND SYS_OP_BLOOM_FILTER (: BF0000, "SYS_P9".) " PATHID'))

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    24 - filter("A".") INCIDENT_DATE' > = TIMESTAMP' 2014 - 10 - 01 00:00:00.000000000 "AND"A"". "" INCIDENT_DATE"< = TIMESTAMP' 2014 - 10 - 09 00:00:00.000000000' AND

    "ITEM_2" = TBL$ OR$ IDX$ PART$ NUM ("INCIDENT", 0,7,65535, "A". ROWID))

    25 filter ("ITEM_4" = TBL$ OR$ IDX$ PART$ NUM ("INCIDENT", 0,7,65535, "A".) ROWID))

    30 - access (SYS_PATH_REVERSE ("PATH") > = HEXTORAW('027FF9') AND SYS_PATH_REVERSE ("PATH") < HEXTORAW ('027FF9FF'))

    32 filter (SYS_XMLI_LOC_ISNODE ("SYS_P2". "LOCATOR") = 1) "

    33 - access("SYS_P2".") GET RID OF"="A ". ROWID AND 'SYS_P2 '. ("' PATHID '=' ID ')

    35 - access("SYS_P4".") GET RID OF"="A ". ROWID AND 'SYS_P2 '. "" ORDER_KEY "< ="SYS_P4. " "" ORDER_KEY "AND"SYS_P4 ". "" ORDER_KEY "< SYS_ORDERKEY_MAXCHILD ("SYS_P2". "ORDER_KEY")) "

    filter ("SYS_P4". "RID"IS "SYS_P2"." GET RID OF"AND TBL$ OR$ IDX$ PART$ NUM("INCIDENT",0,7,65535,"SYS_P2".") "RID") = TBL$ OR$ IDX$ PART$ NUM ("INCIDENT_PATHTABL

    E «(, 0,7,65535, ROWID)).

    36 - filter("SYS_P4".") The VALUE '= 'clark' AND SYS_XMLI_LOC_ISTEXT ("SYS_P4".' LOCATOR', 'SYS_P4 '. (("" PATHID ') = 1).

    PLAN_TABLE_OUTPUT

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Note

    -----

    -dynamic sample used for this survey (level = 6)

    69 selected lines.

    Elapsed time: 00:00:00.47

    SQL > spool off

    Thank you

    CenterB

    You must create a XMLIndex with two groups:

    create table actionnew)

    number of action_pk

    action_date timestamp

    action_detail xmltype

    )

    partition by (range (action_date)

    partition values before_2015 less (timestamp ' 2015-01-01 00:00:00 ')

    , partition values jan_2015 less (timestamp ' 2015-02-01 00:00:00 ')

    , partition values feb_2015 less (timestamp ' 2015-03-01 00:00:00 ')

    );

    create index actionnew_sxi on actionnew (action_detail)

    indexType is xdb.xmlindex

    local

    parameters (q'~)

    Group my_group_1

    XMLTable actionnew_xt1

    "/ audit/action_details/screen_data/tables/table/row.

    path of varchar2 (100) the columns "name".

    , path of surname varchar2 (100) "first name".

    Group my_group_2

    XMLTable actionnew_xt2

    "/ audit/action_details/fields.

    path of varchar2 (100) the columns "name".

    , path of surname varchar2 (100) "first name".

    ~'

    );

    Select x.*

    to actionnew t

    xmltable)

    "/ audit/action_details/screen_data/tables/table/row.

    in passing t.action_detail

    path of varchar2 (100) the columns "name".

    , path of surname varchar2 (100) "first name".

    ) x

    where t.action_date between timestamp ' 2015-02-01 00:00:00 '

    and timestamp ' 2015-03-01 00:00:00 '

    and x.forename = 'anwardo. '

    and x.surname = 'gram '.

    ;

  • Problem to create Plan to explain and use XML indexes. Please follow scenario...

    Hello

    Oracle - Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Version

    I was able to reproduce the error like below:

    Run the following code to Schema1:
    CREATE TABLE TNAME1
    (
       DB_ID            VARCHAR2 (10 BYTE),
       DATA_ID          VARCHAR2 (10 BYTE),
       DATA_ID2         VARCHAR2 (10 BYTE),
       IDENTIFIER1      NUMBER (19) NOT NULL,
       ID1              NUMBER (10) NOT NULL,
       STATUS1          NUMBER (10) NOT NULL,
       TIME_STAMP       NUMBER (19) NOT NULL,
       OBJECT_ID        VARCHAR2 (40 BYTE) NOT NULL,
       OBJECT_NAME      VARCHAR2 (80 BYTE) NOT NULL,
       UNIQUE_ID        VARCHAR2 (255 BYTE),
       DATA_LIVE        CHAR (1 BYTE) NOT NULL,
       XML_MESSAGE      SYS.XMLTYPE,
       ID2              VARCHAR2 (255 BYTE) NOT NULL,
       FLAG1            CHAR (1 BYTE) NOT NULL,
       KEY1             VARCHAR2 (255 BYTE),
       HEADER1          VARCHAR2 (2000 BYTE) NOT NULL,
       VERSION2         VARCHAR2 (255 BYTE) NOT NULL,
       TYPE1            VARCHAR2 (15 BYTE),
       TIMESTAMP1   TIMESTAMP (6),
       SOURCE_NUMBER    NUMBER
    )
    XMLTYPE XML_MESSAGE STORE AS BINARY XML 
    PARTITION BY RANGE (TIMESTAMP1)
       (PARTITION MAX
           VALUES LESS THAN (MAXVALUE)
           )
    NOCOMPRESS
    NOCACHE
    ENABLE ROW MOVEMENT
    /
    
    
    
    begin
    app_utils.drop_parameter('TNAME1_PAR');
    end;
    
    
    
    BEGIN
    DBMS_XMLINDEX.REGISTERPARAMETER(
    'TNAME1_PAR',
    'PATH TABLE     TNAME1_RP_PT
                              PATHS (INCLUDE (            /abc:Msg/product/productType
                                                                    /abc:Msg/Products/Owner
      ) 
                                     NAMESPACE MAPPING (     xmlns:abc="Abc:Set"
                                                       ))
    ');
    END;
    /
    
    
    
    CREATE INDEX Indx_XPATH_TNAME1
       ON "TNAME1" (XML_MESSAGE)
       INDEXTYPE IS XDB.XMLINDEX PARAMETERS ( 'PARAM TNAME1_PAR' )
    local;
    Then in Schema2, create
    create synonym TNAME1 FOR SCHEMA1.TNAME1
    SCHEMA1:
    GRant All on TNAME1 to SCHEMA2
    Now to SCHEMA2, if we try:
    Explain Plan for 
    SELECT xmltype.getclobval (XML_MESSAGE)
    FROM TNAME1 t
    WHERE XMLEXISTS (
    'declare namespace abc="Abc:Set";  /abc:Msg/product/productType= ("1", "2") '
    PASSING XML_MESSAGE);
    WE GET-> ORA-00942: table or view does not exist
    While this works:
    Explain Plan for 
    SELECT xmltype.getclobval (XML_MESSAGE)
    FROM TNAME1 t
    - Please tell me, what is the reason behind this and how can I overcome it. Originally all is my point of view based on this condition to fail in another schema, and not not to pick up the XMLIndexes.

    Also
     SELECT * from DBA_XML_TAB_COLS WHERE TABLE_NAME like 'TNAME1';
    Output is as:
    OWNER | TABLE_NAME | COLUMN_NAME | XMLSCHEMA. SCHEMA_OWNER | ELEMENT_NAME | STORAGE_TYPE | ANYSCHEMA | RUN
    SCHEMA1 | TNAME1 |     XML_MESSAGE |          ||          || BINARY | DON'T | YES |
    SCHEMA1 | TNAME1 |     SYS_NC00025$ |          ||          || CLOB |     ||

    -Can I change AnySchema to YES to NO for - column_name = XML_MESSAGE? Maybe that will solve my problem.
    -SYS_NC00025$ is the XML Index, why not get all the values for ANYSCHEMA, RUN on it. What is causing the problem.


    Please suggest... Thank you...

    The problem sounds familiar. Please create a SR on http://support.oracle.com for this one.

  • ORA-01408: such list already indexed column.

    Hi all

    I get this error while improving my EBS 11.1.0.7 database at 11.2.0.4. I checked the newspaper and it shows:

    create indexes system.repcat$ _audit_column_f2_idx on

    2 system.repcat$ (base_sname, base_oname, base_conflict_type_id, _audit_column

    3 base_reference_name)

    4.

    System.repcat$ (base_sname, base_oname, base_conflict_type_id, _audit_column

    *

    ERROR on line 2:

    ORA-01408: such list already indexed column.

    Now what I want to know is if I have to cancel the session dbua, start the database, delete the index and dbua session start again?

    Kind regards

    Vinod

    The solution is already documented here:

    http://docs.Oracle.com/CD/E11882_01/server.112/e23633/upgrade.htm#UPGRD52647

    The solution is to drop the REPCAT$_AUDIT_COLUMN_IDX1 Directory and re-run the upgrade as described in "re-run the upgrade to Oracle Database".

  • Structured XML index with multiple namespaces

    Hello

    I have some difficulty to create a xmlindex with a component structured on a column of xmltype without schema register, clob data using multiple namespaces.

    The code I'm using atm:
    CREATE TABLE "DECLARATIONS"
      (
        "ID" NUMBER(19,0),
        "XML" "SYS"."XMLTYPE"
      )
    
    CREATE INDEX decl_header_ix ON "DECLARATIONS"(xml) INDEXTYPE IS XDB.XMLINDEX
      PARAMETERS ('PATHS (INCLUDE (/emcs:emcsDeclaration/emcs:header//*)
                          NAMESPACE MAPPING (xmlns:emcs="http://www.myurl.eu/myapp/schema/emcs/nl"))');
    
    INSERT INTO "DECLARATIONS" VALUES (1,'
    <?xml version = ''1.0'' encoding = ''UTF-8'' standalone = ''yes''?>
    <emcs:emcsDeclaration xsi:schemaLocation="http://www.myurl.eu/myapp/schema/emcs/nl emcs_domain.xsd"
     xmlns:common="http://www.myurl.eu/myapp/schema/common"
     xmlns:emcs="http://www.myurl.eu/myapp/schema/emcs/nl"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <emcs:header>
          <common:identifier>70</common:identifier>
          <common:declarationSequenceNumber>54566</common:declarationSequenceNumber>
          <common:dateCreated>2010-10-21-01:00</common:dateCreated>
          <common:status>01 Draft e-AAD in preparation</common:status>
       </emcs:header>
    </emcs:emcsDeclaration>');
    At this time, it is not desirable for us to save the schemas used in oracle. According to the documentation, I should be able to add a component structured index as follows:
    BEGIN
          DBMS_XMLINDEX.registerParameter('MY_XSI_GROUP_PARAMETER'
                  , 'ADD_GROUP GROUP MY_XSI_GROUP
                   XMLTABLE decl_header
                   XMLNAMESPACES (''http://www.myurl.eu/myapp/schema/emcs/nl'' AS emcs,
                           ''http://www.myurl.eu/myapp/schema/common'' AS common),
                          ''*''
                        COLUMNS
                  status VARCHAR2(30)  PATH ''/emcs:emcsDeclaration/emcs:header/common:status/text()''
           ');
       END;
       / 
    ALTER INDEX DECL_HEADER_IX PARAMETERS('PARAM MY_XSI_GROUP_PARAMETER');
    However the result is an ORA-00904: invalid identifier. After a few experiences it seems that oracle is trying to parse the URL namespace as identifiers (even tho http://download.oracle.com/docs/cd/E14072_01/appdev.112/e10492/xdb_indexing.htm#BCGJAAGH & http://download.oracle.com/docs/cd/E14072_01/appdev.112/e10492/xdb_xquery.htm#BABJCHCC specify the old), so I swapped their autour:
    BEGIN
          DBMS_XMLINDEX.dropParameter('MY_XSI_GROUP_PARAMETER');
          DBMS_XMLINDEX.registerParameter('MY_XSI_GROUP_PARAMETER'
              , 'ADD_GROUP GROUP MY_XSI_GROUP
              XMLTABLE decl_header
              XMLNAMESPACES (emcs ''http://www.myurl.eu/myapp/schema/emcs/nl'',
              common ''http://www.myurl.eu/myapp/schema/common''),
              ''*''
              COLUMNS
              status varchar2(30)  PATH ''/emcs:emcsDeclaration/emcs:header/common:status/text()''
           ');
       END;
       / 
    ALTER INDEX DECL_HEADER_IX PARAMETERS('PARAM MY_XSI_GROUP_PARAMETER');
    Oracle doesn't seem to be a little further in this, resulting in an ORA-19102: literal string XQuery waited. Here, I kinda hit a dead-end. Removing the with xmlnamespaces altogether leads to an ORA-31013 statement: invalid XPATH expression. Passing by the examples on http://www.liberidu.com/blog/?p=1805 works very well, but whenever I try to add namespaces to it they stop working as well.

    So my question is: How do xmlnamespaces (with the default namespaces) to work in a structured xmlindex component?

    Hello

    I agree that is not specified in the documentation, but in the with XMLNamespaces clause, each namespace identifier must be enclosed in double quotes.
    So, pretty much like your first attempt:

    BEGIN
      DBMS_XMLINDEX.registerParameter(
        'MY_XSI_GROUP_PARAMETER',
        'ADD_GROUP GROUP MY_XSI_GROUP
         XMLTABLE decl_header
         XMLNAMESPACES (''http://www.myurl.eu/myapp/schema/emcs/nl'' AS "emcs",
                        ''http://www.myurl.eu/myapp/schema/common'' AS "common"),
         ''*''
         COLUMNS
          status VARCHAR2(30)  PATH ''/emcs:emcsDeclaration/emcs:header/common:status/text()'''
      );
    END;
    / 
    

    Subsequently, the addition of the parameter to the index should be OK.

  • Headaches of XML indexing.

    Hello all, I was hoping that one of you might be kind enough to help out me. I'm new to XDB and I have a question on how to index xml docs.

    Stats:
    Running Oracle 11.1.0.7
    Data is stored in SYS. XML_TYPE
    No schema is used.

    First, I'll explain how I use XML in the Oracle database. I'm working on an application that uses Oracle under his persistence layer. The application allows users to create fields defined by the user (UDF) in fact there is no real limit to how udf, they can set. However, I don't expect you to be more than 10 per entity db. The XML I propose has the form:

    <? XML version = "1.0" encoding = "utf-8"? >
    < ArrayOfUDF xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" >
    < UDF >
    < DateType > 1242394042 < / DateType >
    < Master >
    < ReferencedID >
    < value > E3FA17A28BE24FFA80C53F617CD61215 < / value >
    < / ReferencedID >
    < / master >
    < / UDF >
    < UDF >
    < NumberType > 1903.17 < / NumberType >
    < Master >
    < ReferencedID >
    < value > 28EC6FC7231C44F0ADE60897265FDA6D < / value >
    < / ReferencedID >
    < / master >
    < / UDF >
    < UDF >
    < StringType > we put the challenge to a rock OFF < / StringType >
    < Master > >
    < ReferencedID >
    < value > 579277135B0C4EABB7122CC5E558B7CA < / value >
    < / ReferencedID >
    < / master >
    < / UDF >
    < / ArrayOfUDF >

    UDF is the repeating pattern that defines the UDF for a particular entity db, say 'customer '.

    In addition, I need be able to allow the research against this XML document and not just simple string searches. You can see that I have three types defined:

    DateType, NumberType and StringType. I offered to store dates as dates of the period to the date of the search easier.

    Thus, for example, if it's a number type the user must be able to find such as:

    Select * from customer
    where dollaramount > = 500 and dollaramount < = 10000. (using the xml query language appropriate).

    In fact, the user must be able to search for "NumberType" like any other type NUMBER() in Oracle.
    The same applies the DateType as well.

    I tell myself that I can use an Index of context for the string type for fuzzy searches and left right excavations and research token.

    The big question to which I have no answer, is how to index the NumberType and DateType nodes so that they are available as described above.
    The DateType node does not have to be stored as Epoch, it can be a form of regular date.

    You can also see that the UDF node is not a singleton, but rather a collection which may vary in number. My example has the node repeat three times.

    I have read all the documentation and create the context index and search with it, but that's the easy part, I can handle. It shows the date and the number type that gives me a time difficult.

    Any help would be greatly appreciated.

    Use a XMLIndex (take a look at the development of XMLDB for more information Guide)

    The simplest XMLIndex syntax (which indexes ALL - and will perhaps unwanted storage above the index) is

    SQL> CREATE INDEX customer_xmlindex ON customer({xmltype column})
      2  indextype IS xdb.xmlindex
      3  ;
    

    Also take a look at the definition of the path options XMLIndex and or refresh the possibilities.
    More details here: xmlindex

  • XML indexing headaches!

    Hello all, I was hoping that one of you might be kind enough to help out me. I'm new to XDB and I have a question on how to index xml docs. First, I'll explain how I use XML in the Oracle database. I'm working on an application that uses Oracle under his persistence layer. The application allows users to create fields defined by the user (UDF) in fact there is no real limit to how udf, they can set. However, I don't expect you to be more than 10 per entity db. The XML I propose has the form:

    <? XML version = "1.0" encoding = "utf-8"? >
    < ArrayOfUDF xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" >
    < UDF >
    < DateType > 1242394042 < / DateType >
    < Master >
    < ReferencedID >
    < value > E3FA17A28BE24FFA80C53F617CD61215 < / value >
    < / ReferencedID >
    < / master >
    < / UDF >
    < UDF >
    < NumberType > 1903.17 < / NumberType >
    < Master >
    < ReferencedID >
    < value > 28EC6FC7231C44F0ADE60897265FDA6D < / value >
    < / ReferencedID >
    < / master >
    < / UDF >
    < UDF >
    < StringType > we put the challenge to a rock OFF < / StringType >
    < Master > >
    < ReferencedID >
    < value > 579277135B0C4EABB7122CC5E558B7CA < / value >
    < / ReferencedID >
    < / master >
    < / UDF >
    < / ArrayOfUDF >

    UDF is the repeating pattern that defines the UDF for a particular entity db, say 'customer '.

    In addition, I need be able to allow the research against this XML document and not just simple string searches. You can see that I have three types defined:

    DateType, NumberType and StringType. I offered to store dates as dates of the period to the date of the search easier.

    Thus, for example, if it's a number type the user must be able to find such as:

    Select * from customer
    where dollaramount > = 500 and dollaramount < = 10000. (using the xml query language appropriate).

    In fact, the user must be able to search for "NumberType" like any other type NUMBER() in Oracle.
    The same applies the DateType as well.

    I tell myself that I can use an Index of context for the string type for fuzzy searches and left right excavations and research token.


    The big question to which I have no answer, is how to index the NumberType and DateType nodes so that they are available as described above.
    The DateType node does not have to be stored as Epoch, it can be a form of regular date.

    You can also see that the UDF node is not a singleton, but rather a collection which may vary in number. My example has the node repeat three times.

    I have read all the documentation and create the context index and search with it, but that's the easy part, I can handle. It shows the date and the number type that gives me a time difficult.

    Any help would be greatly appreciated.

    The best place for your question is the {forum: id = 34} forum. A few other details to include in your question are:
    -version of db (4 digits)
    -How you store the data in the DB (clob, XMLType (with or without schema), hybrid, object-relational)?
    -what you have created so far (CREATE statements, etc.)

    You can also browse [Marco blog | http://www.liberidu.com/blog/] (it's a forum above)

  • drop-down list or a list with index

    I have a few drop-down menus with a large number of options (100 +), for example a selection of countries.

    Other platforms offer a clue, similar to the native contact app where you can select a letter on the right side to reach a certain letter.

    Does anyone have code that does something similar, or saw a sample like this?

    I think currently on the use of a button that triggers a ControlDelegate with a ListView, perhaps with a search field to filter the items.

    I don't know how to implement the index hovering well. Any ideas?

    Not as fancy as the contacts application and the letter list scrolls as well and has no popup, but it works well.

    I used two views of list in a DockLayout, one for the main content, the other for the index.

    In the event onTouch I compare the item touched with headers in main list

  • List invalid index entries

    I imported MS Word documents with index entries (Cyrillic and Latin alphabetet, quotes, etc.).

    Now I want to generate indexes and I have the alert:

    "The index could not be generated.

    One or more index entries contains invalid characters.

    Please remove all invalid characters in the index entries.

    Where can I find the full list of characters which Adobe defines as invalid?

    You don't think that Preflight to verify and mark these characters?

    Thanks Jongware,

    I thoroughly have the bug.

    In Polish typography should be used in compound words , pair of characters in: conditional dash and hyphen nonbreaking to resume link on the left edge of the column. (He is Polish and Slovak rulez).

    This pair worked very well in CS2.

    (From cs3 or cs4 I don't remember) is not important to this pair of characters, just language Polish or Slovak of choice. And these hyphens are duplicated on the left edge of a column on the fly.

    But the docx file import engine still has the bug. If someone put such pair for MS Word, docx file, InDesign cs 5.5 cannot import properely in the InDesign document.

    I checked the my document idml file

    Reference topic should be Yat - Kha. In MS Word, there is [conditional and hyphen nonbreaking hyphen] Kha

    but inside the reference in idml topic file is something like this I sgned in bold:

    ReferencedTopic = "u1b3TopicnYat<?" 001f HELP? > <? 001e HELP? ' >Kha.

    I don't know what? 001f HELP? and? 001E help?

    But I know now that there are invalid characters

    That was the problem.

  • XML: Apending children

    Let's say that the following XML:
    < list >
    < item > < / item >
    < item > < / item >
    < / list >

    Now in ActionScript, if I have to loop through all the children and you are trying to add text nodes in each node as for

    (pseudocode)

    children = xml.children ();
    for (i = 0; i < children.length (); ++ I)
    {
    children .appendChild ("test" + i);
    }

    What is happening here is the two nodes updated twice. It seems that the XML code adds the child to all nodes of the same name. So now my XML looks like this:

    < list >
    < element > test1 test2 < / item >
    < element > test1 test2 < / item >
    < / list >

    What I want to do is the following:
    < list >
    Test1 < item > < / item >
    Test2 < item > < / item >
    < / list >


    Is this possible or is the XML in ActionScript borked?

    Hmm, I see now that rather than managing multiple xml nodes, flex prefer to group similar nodes in a single table. I'm not particularly fond of that it goes against how to work with XML in other languages and platforms, but I can live with that for now.

    As a solution, I'm deleting duplicate nodes and instead adding children to the same kids over and over again. If the result is as follows:



    Item1
    Item2
    Item3
    ...

    In the action script, I have to do the following to access these text nodes:

    list.item.getChildren () [index];

    I guess that's not bad. He worked my way, the only difference would have been:

    List.Item [index]

    So, there is a further step involved. Maybe, I'll just write a wrapper which will do that for me.

    If anyone wants to share their comments on this, please do. Meanwhile I'll label has responded to this topic.

  • Loop trow XML

    Hey all,.

    I spend like 4 hours to find out how one loop trow xml but I can't get it.

    My CF
    < cfset xml = GetHttpRequestData() >
    < cfset xml = XmlParse (xml.content) >
    < cfloop from = '1' = "#ArrayLen (xml." "List.Transaction) # ' index 'i' = >
    <>(#i #) cfoutput < / cfoutput >
    < / cfloop >

    My XML:
    <? XML version = "1.0" encoding = "utf-8"? >
    < list >
    < transaction >
    < AccountId > 1 < / AccountId >
    Eerste < AccountKey > < / AccountKey >
    < / transaction >
    < transaction >
    < AccountId > 2 < / AccountId >
    Tweede < AccountKey > < / AccountKey >
    < / transaction >
    < / list >

    I want to loop trow transactions, so I can read their account information.
    Tried Jules Destrooper like this:
    #xml. List.Transaction # (i is the value, such as 1 and 2, which is created in the loop)
    But it gives answers like this:
    coldfusion.xml.XmlNodeList@823c42

    I have colleagues that I'm heading the wrong way and impossible to find a good tutorial.
    So, how can I get the info from xml? How to make a loop trow xml?

    Thank you

    Finaly done, it's code:



    #xml.content #.

    1 = [#isXmlRoot (xml. [List) #]

    2 = [#isXmlElem (xml. [List.Transaction) #]

    3 = [#isXmlElem (xml. [List.Transaction.AccountId) #]

    3 = [(xml) #isXmlElem #]

    4 = [#structKeyList (xml. [List.Transaction) #]

    5 = [#xml. List.Transaction [1]. [AccountKey.xmlText #]

  • has chosen xml type

    Hello

    I was reading the guide

    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28369/xdb01int.htm#BABCCCJI

    for the storage of model chosen,

    but I don't understande

    "If your data are generally without structure or variable structure. Structure of a document may vary over time (evolution). The content is mixed (semi-structured): many elements contain text nodes and child elements. Many XML elements can be absent or appear in different orders. Documents might or might not conform to an XML schema. »

    what storage model should I use for create a table type of xml? binary xml?

    Thank you

    XMLType binary XML (navigation) is the best alternative in the future.

    It can be used with

    -XML Schemabased / Schemaless XML

    -Provides semi-structured XML, structured XML index indexes and index XML text options

  • Oracle xml db to research extract the date year

    Version Oracle 11.2.0.3

    [code]

    drop table test;

    create table test of xmltype.

    Insert in the test

    values (')

    < employee

    " xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xsi: noNamespaceSchemaLocation =" "> ".

    < location >

    < joiningDate id = "on site" >

    2012 06-18 of < hireDate > < / hireDate >

    < / joiningDate >

    < joiningDate id = "offshore" >

    2011 07-8 < hireDate > < / hireDate >

    < / joiningDate >

    < / location >

    (< / employee > ');

    commit;

    I have a lot of these documents inserted into a 11.2.0.3 database.

    I will return all employees who were hired on the spot in 2012

    Select x.*

    t-test,

    XMLTable)

    XmlNamespaces)

                   ' http://www.w3.org/2001/XMLSchema-instance ' as "xsi"

    ),

    ' for $d/employee/location

    where $d/joiningDate[@id="onsite"]/hireDate/text () = xs:date("2012-06-18")

    return $from

    in passing t.object_value

    columns

    HireDate date path 'joiningDate[@id="onsite"]/hireDate '.

    ) the form x

    [/ code]

    This is my test

    But I don't have a specific date rather a campaign determined as 2012

    What index to use to speed up this request please

    What index to use to speed up this request please

    There are different ways to do this.

    Read this book to get a broader overview: http://www.oracle.com/technetwork/database-features/xmldb/overview/xmldb-bpwp-12cr1-1964809.pdf

    The best way depends on whether you want to index the other values at the same time, or just this single date value.

    Assuming that the latest, here are three options:

    (1) virtual indexed column

    alter table test add)

    onsite_hiredate date)

    (xmlcast)

    XMLQUERY)

    ' / Employee/location/joiningDate[@id="onsite"]/hireDate'

    passage object_value

    contents of return

    )

    as date

    )

    ) virtual

    ) ;

    create indexes on test (onsite_hiredate) test_onsite_hiredate_ix;

    or an FBI so you need to be specific:

    create index test_onsite_hiredate_ix on test (extract (year onsite_hiredate));

    SQL > select *.

    2 test

    3 where onsite_hiredate > = date '' 2012-01-01

    4 and onsite_hiredate< date="" '2013-01-01'="">

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3994140658

    -------------------------------------------------------------------------------------------------------

    | ID | Operation | Name                    | Lines | Bytes | Cost (% CPU). Time |

    -------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                         |     1.   196.     2 (0) | 00:00:01 |

    |   1.  TABLE ACCESS BY INDEX ROWID | TEST                    |     1.   196.     2 (0) | 00:00:01 |

    |*  2 |   INDEX RANGE SCAN | TEST_ONSITE_HIREDATE_IX |     1.       |     1 (0) | 00:00:01 |

    -------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 - access ("ONSITE_HIREDATE" > = TO_DATE(' 2012-01-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND)

    'ONSITE_HIREDATE '.

    (2) not structured XML index with the creation of a subset of single track

    create indexes on indextype test (object_value) test_xml_uix is xdb.xmlindex

    settings)

    "TABLE test_ptab RUNNER.

    "Paths (/ Employee/rental/joiningDate)"

    );

    Select *.

    of the test

    where (xmlexists)

    "[' Employee/location/joiningDate[@id="onsite"]/hireDate[fn:year-from-date (.) = $yr].

    passage object_value

    , 2012 in 'year '.

    );

    (3) XML structured index

    CREATE INDEX test_xml_sxi ON test (object_value)

    INDEXTYPE IS XDB. XMLIndex SETTINGS (q'~)

    Test_xtab XMLTable ' / employees '

    COLUMNS on the spot date PATH 'location/joiningDate[@id="onsite"]/hireDate '.

    ~'

    );

    Secondary index:

    create index test_xml_hiredate_ix on test_xtab (on-site);

    SQL > select x.*

    test 2 t

    3, xmltable)

    4 ' / employees '

    5 passage t.object_value

    6 columns

    7 hiredate date path 'location/joiningDate[@id="onsite"]/hireDate '.

    (8) the form x

    9 where x.hiredate > = date '' 2012-01-01

    10;

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 897007560

    -----------------------------------------------------------------------------------------------------

    | ID | Operation | Name                 | Lines | Bytes | Cost (% CPU). Time |

    -----------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                      |     1.    42.     2 (0) | 00:00:01 |

    |   1.  NESTED LOOPS |                      |     1.    42.     2 (0) | 00:00:01 |

    |   2.   TABLE ACCESS BY INDEX ROWID | TEST_XTAB |     1.    25.     2 (0) | 00:00:01 |

    |*  3 |    INDEX RANGE SCAN | TEST_XML_HIREDATE_IX |     1.       |     1 (0) | 00:00:01 |

    |*  4 |   INDEX UNIQUE SCAN | SYS_C0014535 |     1.    17.     0 (0) | 00:00:01 |

    -----------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    3 - access("SYS_SXI_0".") On the SITE "> = TO_DATE (' 2012-01-01 00:00:00 ',' syyyy-mm-jj)"

    HH24:mi:SS'))

    4 - access("T"."$SYS_NC_OID «= «SYS_SXI_0».») OID")

  • Find the empty XML node on a table with 15 M lines

    I have a query that runs to always seek to empty xml node.

    CREATE TABLE TEST_TAB (ID number, doc XMLTYPE);

    SELECT COUNT (1)

    OF test_tab

    WHERE ((XMLEXISTS (declare default element namespace "http://oracle.com/»;)))  * / EmployeeNode / text () [not (empty (.))]'

    PASSAGE DOC)));

    Are there specific oracle or operator XML text that is more effective to check null values or a specific type of text/xml index that is best suited looking for nulls in the whole of nodes?

    Thank you

    Kevin

    In the meantime, here's a test on a similar scenario.

    It seems that the structured XMLIndex gives the best response time. The obvious drawback is that she is very specific and cannot be used to solve other queries.

    SQL > drop table test_tab is serving;

    Deleted table.

    SQL > create table test_tab like

    2. select id, cast (level as number)

    3, xmlparse (document

    4'http://xmlns.example.org ">"

    5         || -case when mod (level 5) = 0 then end level

    6         || '' correct

    (7) doc

    8 double

    9 connect by level<= 100000="">

    Table created.

    SQL > set timing on

    SQL > define pages 100

    SQL > set lines 200

    SQL > set autotrace on explain

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:00.92

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:09.09

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 2371188561

    --------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    --------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |          |     1.   125.   271 (1) | 00:00:04 |

    |   1.  GLOBAL TRI |          |     1.   125.            |          |

    |*  2 |   FILTER |          |       |       |            |          |

    |   3.    TABLE ACCESS FULL | TEST_TAB |   100K |    11 M |   269 (1) | 00:00:04 |

    |   4.    XPATH EVALUATION.          |       |       |            |          |

    --------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 filter (EXISTS (SELECT 0 FROM))

    XPATHTABLE ('/ oraxq_defpfx:root / oraxq_defpfx:Item / Text () ' PASSING: B1)

    PATH OF XMLTYPE COLUMNS ' C_00$ ' '.')  "P"))

    SQL >

    With the index structured:

    SQL >

    SQL > create index test_tab_sxi on test_tab (doc)

    2 indextype is xdb.xmlindex

    () 3 parameters

    4Q ' {XMLTABLE test_tab_xt

    5 XMLNAMESPACES (default 'http://xmlns.example.org'),

    6 ' / root/item / text () '

    {7 item_value PATH VARCHAR2 COLUMNS (30) '.'} "

    8  ) ;

    The index is created.

    Elapsed time: 00:00:10.13

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:01.69

    SQL >

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:00.18

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3461631238

    -------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    -------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |             |     1.    28.   290 (1) | 00:00:04 |

    |   1.  GLOBAL TRI |             |     1.    28.            |          |

    |*  2 |   HASH JOIN RIGHT SEMI |             | 22015 |   601K |   290 (1) | 00:00:04 |

    |*  3 |    TABLE ACCESS FULL | TEST_TAB_XT | 22015 |   343K |    20 (0) | 00:00:01 |

    |   4.    TABLE ACCESS FULL | TEST_TAB |   100K |  1171K |   269 (1) | 00:00:04 |

    -------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 - access ("TEST_TAB". ROWID = "SYS_SXI_0." ("' RID ')

    3 - filter("SYS_SXI_0".") ITEM_VALUE' IS NOT NULL)

    With an index not structured:

    SQL > drop index test_tab_sxi;

    The index is deleted.

    Elapsed time: 00:00:00.11

    SQL >

    SQL >

    SQL > create index test_tab_uxi on test_tab (doc)

    2 indextype is xdb.xmlindex

    3 parameters ("PATH of TABLE test_tab_pt

    4 PATHS (INCLUDE (/ root/point))

    (5 MAPPING of namespace (xmlns = "http://xmlns.example.org"))');

    The index is created.

    Elapsed time: 00:01:20.99

    SQL >

    SQL > exec dbms_stats.gather_table_stats (user, 'TEST_TAB');

    PL/SQL procedure successfully completed.

    Elapsed time: 00:00:06.56

    SQL >

    SQL > select count (*)

    2 of test_tab

    3 where (xmlexists)

    4 ' declare default element namespace "http://xmlns.example.org"; / root/item/Text () '

    5 passage doc

    6  ) ;

    COUNT (*)

    ----------

    20000

    Elapsed time: 00:00:00.45

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 2464052102

    ---------------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |

    ---------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |             |     1.    42.       |   773 (1) | 00:00:10 |

    |   1.  GLOBAL TRI |             |     1.    42.       |            |          |

    |*  2 |   HASH JOIN RIGHT SEMI |             |  6547 |   268K |  2176K |   773 (1) | 00:00:10 |

    |*  3 |    TABLE ACCESS FULL | TEST_TAB_PT | 53020 |  1553K |       |   283 (2) | 00:00:04 |

    |   4.    TABLE ACCESS FULL | TEST_TAB |   100K |  1171K |       |   269 (1) | 00:00:04 |

    ---------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 - access ("TEST_TAB". ROWID = "SYS_P0." ("' RID ')

    3 - filter("SYS_P0".") PATHID "= HEXTORAW ('061D') AND"

    SYS_XMLI_LOC_ISTEXT ("SYS_P0". "LOCATOR", "SYS_P0" "." " PATHID') = 1)

    (tested on 11.2.0.2)

Maybe you are looking for