Using extractvalue with XMLTYPE to extract multiple nodes

hi ,
I'm trying to fetch data from xml which is stored as clob in db (10g) ,
when i tried to fetch with query as below
SELECT extractvalue(XMLTYPE(xjm.X_MSG_XML), '//orderRequest/order/orderItem/alternativeIdentifer/value') uiid
FROM TABLE_X_MSG_ATTR xma, TABLE_X_JMS_MSG xjm
WHERE xma.X_MSG_ATTR2X_JMS_MSG=xjm.OBJID
AND xma.X_ATTR_NAME='MOP_ID'
AND xma.X_ATTR_VALUE in ('RJM78999')
and got **ORA-19025: EXTRACTVALUE returns value of only one node**
so i modified it as below
SELECT extractvalue(value(x), '//orderRequest/order/orderItem/alternativeIdentifer/value') uiid
FROM TABLE_X_MSG_ATTR xma, TABLE_X_JMS_MSG xjm
,TABLE(XMLSequence(extractvalue(XMLTYPE(xjm.X_MSG_XML),'//orderRequest/order/orderItem/alternativeIdentifer/value'))) x
WHERE xma.X_MSG_ATTR2X_JMS_MSG=xjm.OBJID
AND xma.X_ATTR_NAME='MOP_ID'
AND xma.X_ATTR_VALUE in ('RJM78999')
ORA-29900: operator binding does not exist
ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLSEQUENCE'
no success :( it is working for single record (node)all perfect
Thnkz
Edited by: Volution2111 on Sep 11, 2010 5:08 AM
Edited by: Volution2111 on Sep 11, 2010 5:10 AM

Difficult to give the exact answer without knowing which node repeats..
Howver it will be something like this
select extractValue(value(x),'/RepeatingNode/NonRepatingNode/NonRepeatingNode)
  from TABLE, table(xmlsequence(extract(xmltype(clob),'/Root/Node/RepeatingNode')))) x

Similar Messages

  • Integrtion Scenario using BPM with two sender and multiple receiver

    integrtion Scenario using BPM with two sender and multiple receiver
    How many Application Components are required?

    Hi Vinod,
    1) In integration repository you can have one or many software components it depends on your landscape orchestration
    2) In integration direcory you need at least one service for bpm and one or many for each system in your bpm
    also each connection between systems and bpm must have receiver determination and so on.
    Advice: Please treat BPM as a separate system.
    best,
    Wojciech

  • Using XPath with SQL to extract XML data

    Given data such as this one:
    <?xml version="1.0"?>
    <ExtendedData>
       <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
    </ExtendedData>I normally use extractValue function as shown below for example to extract the value for the last parameter in the data above, e.g:
    select extractValue(extended_data,'/ExtendedData/Parameter[@name="RealProv"]/BooleanValue') "my_column_alias" from tableAny ideas on how I may return the value of the parameter xsi:nil from this node:
    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>I'd like to extract the true in xsi:nil="true"...
    Thanks,
    Edited by: HouseofHunger on May 15, 2012 2:13 PM
    Edited by: HouseofHunger on May 15, 2012 2:13 PM

    Extractvalue() has a third parameter we can use to declare namespace mappings :
    SQL> with sample_data as (
      2    select xmltype('<?xml version="1.0"?>
      3  <ExtendedData>
      4    <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      5    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      6    <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      7    <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
      8  </ExtendedData>') doc
      9    from dual
    10  )
    11  select extractvalue(
    12           doc
    13         , '/ExtendedData/Parameter[@name="BARRING_PASSWORD"]/@xsi:nil'
    14         , 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
    15         )
    16  from sample_data
    17  ;
    EXTRACTVALUE(DOC,'/EXTENDEDDAT
    true
    If you're on 11.2.0.2 and up, extractvalue() is deprecated.
    One should use XMLCast/XMLQuery instead :
    SQL> with sample_data as (
      2    select xmltype('<?xml version="1.0"?>
      3  <ExtendedData>
      4    <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>
      5    <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
      6    <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>
      7    <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>
      8  </ExtendedData>') doc
      9    from dual
    10  )
    11  select xmlcast(
    12           xmlquery('/ExtendedData/Parameter[@name="BARRING_PASSWORD"]/@xsi:nil'
    13            passing doc
    14            returning content
    15           ) as varchar2(5)
    16         )
    17  from sample_data
    18  ;
    XMLCAST(XMLQUERY('/EXTENDEDDAT
    true
    Note : the xsi prefix is predefined when using Oracle XQuery, so in this case we don't have to declare it explicitly.
    Edited by: odie_63 on 15 mai 2012 15:23

  • OracleDataReader allocation using extractvalue() on XMLType column

    I am accessing an element within an XMLType column in a select statement using the extractvalue SQL function.
    Select ExtractValue(column_name,'//Text') from table_name
    I noticed that the RowSize for the command used to execute the select is unusually large (~24K). I have narrowed the space allocation issue down to the extractvalue() column, which is about 8k per instance of extractvalue() in the select statement. Since the fetch size if 64K, I am seeing a lot of calls to opsDacRead (DB round trips?) in the ODP.NET log, probably due to the fact that only 3 rows are being returned in each call to opsDacRead.
    My question is: How does ODP.NET determine the amount of space allocated within the reader's buffer for such a column? The element I am trying to extract is defined in the xml schema as 'xs:string' and is never more than 40 characters or so.

    Mark,
    Thanks for the response.
    Yes, I tried increasing FetchSize. Unfortunately, under heavy load, I experienced long execution/wait times within the first and last calls to opsDacRead() while walking the reader. I suspect that was due to allocation and clean-up.
    However, I did find out why the buffer size was so large. If the xml schema does not contain length restrictions on string/text elements via the maxLength option, Oracle defines the underlying field in the data type created for the schema as VARCHAR2(4000).
    I'm pretty sure that adding a maxLength restriction to the string element in the xml schema will reduce the size of the data type's field and in turn reduce the size of the Reader's buffer, but I haven't had a chance to test it.
    Thanks again,
    -Jeff

  • Issue with using xmltable() with xmltype() in plsql--help needed urgent

    HI All,
    I am trying to use XMLTABLE() to get the data from the xmltype(), I used the below query, when I run this, I get the syntax error "ORA-00906: missing left parenthesis--I am struggling to find out which paranthesis I am missing
    00906. 00000 - "missing left parenthesis"
    *Cause:
    *Action:
    Error at Line: 9 Column: 22"
    SELECT
    hours.OpeningTime, hours.ClosingTime, hours.DayOfWeek
    from table1 tab,
    XMLTABLE(XMLNAMESPACES(DEFAULT 'https://xxx.xxx.xx.gov/'),'/ProviderApplicationDTO/ProvOperationHours/WeekHours/KeyValuePairOfFirstDayOfWeekHoursOfOperation'
    PASSING tab.column --this column is of xmltype()
    COLUMNS
    OpeningTime varchar2 PATH '/ProviderApplicationDTO/ProvOperationHours/WeekHours/KeyValuePairOfFirstDayOfWeekHoursOfOperation/Value/OpeningTime',
    ClosingTime varchar2 PATH '/ProviderApplicationDTO/ProvOperationHours/WeekHours/KeyValuePairOfFirstDayOfWeekHoursOfOperation/Value/ClosingTime',
    DayOfWeek varchar2 PATH '/ProviderApplicationDTO/ProvOperationHours/WeekHours/KeyValuePairOfFirstDayOfWeekHoursOfOperation/Key') hours
    Where column = 70;
    <ProviderApplicationDTO>
    <ProvOperationHours>
    <WeekHours>
    <KeyValuePairOfFirstDayOfWeekHoursOfOperation>
    <Value>
    <OpeningTime />
    <ClosingTime />
    </Value>
    <Key>Sunday</Key>
    </KeyValuePairOfFirstDayOfWeekHoursOfOperation>
    <KeyValuePairOfFirstDayOfWeekHoursOfOperation>
    <Value>
    <OpeningTime />
    <ClosingTime />
    <IsOpenAM>AM</IsOpenAM>
    <IsCloseAM>PM</IsCloseAM>
    </Value>
    <Key>Monday</Key>
    </KeyValuePairOfFirstDayOfWeekHoursOfOperation>
    <KeyValuePairOfFirstDayOfWeekHoursOfOperation>
    <Value>
    <OpeningTime />
    <ClosingTime />
    </Value>
    </ProvOperationHours>
    </ProviderApplicationDTO>
    Edited by: 804681 on Jan 7, 2011 8:22 AM

    Interesting... it seems they either changed the comma in between 10g and 11g or there is a bug in the 11g documentation. I think I will report it to the documentation forum. Since the 11g gif description includes the coma. http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/img_text/xmltable.htm
    I guess Michaels found the real bug. You can always count on him when it gets to XML-action.

  • How do I use Dropbox with InDesign?

    I want to use InDesign with Dropbox so that multiple people can access the InDesign file and pictures. I already know that it not possible for two people to edit at once so that is not my problem. I was wondering if anyone had recommendations on how to structure the shared Dropbox folder so that the links to images are preserved when people open it on different computers. Any other tips concerning Dropbox and InDesign are also welcome!

    As you probably know, dropbox is a sync based service. You create a folder inside dropbox area and dropbox will automatically upload it to their cloud. If you change something and save, dropbox syncs your local and remote files immediately. If you shrare that folder with other dropbox users, dropbox will copy that folder to their computers as well. Here comes the dangerous part... Two people can actually work at the same time with same file because they are using local copy of the file, but when they save they work, later save will overwrite the first save when dropbox syncs the files to server. Fortunately there's some version controlling in dropbox's dashboard but it can still cause a big headache...

  • How to generate xml file with multiple nodes using sqlserver as database in SSIS..

    Hi ,
    I have to generate the xml file using multiple nodes by using ssis and database is sqlserver.
    Can some one guide me on to perform this task using script task?
    sudha

    Why not use T-SQL for generating XML? You can use FOR XML for that
    http://visakhm.blogspot.in/2014/05/t-sql-tips-fun-with-for-xml-path.html
    http://visakhm.blogspot.in/2013/12/generating-nested-xml-structures-with.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Using the opmn:ormi protocol with multiple nodes

    Hi
    If I use the opmn:ormi protocol with multiple nodes, will it load balance between the nodes or will it simply try to connect to the first node and if it can't it will connect to the second node?.
    Instead of specifying multiple nodes can I set the host to point to a load balancer?
    Which solution is best?

    repost

  • Issues with using XMLType indexes against a table with XMLType column

    I am attempting to use an XMLIndex with a Structured Component and not having too much luck. Not much data in metalink nor is the documentation very helpful:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb_indexing.htm#BCGHGIGC
    The table DDL is as follows:
    CREATE TABLE ECI_SCHEMA.REV_ITEM_EARN_DTL_VIRTUAL(
    REV_ITEM_EARN_DTL_ID_NBR NUMBER(16,0) NOT NULL,
    UNIQ_MSG_ID_NBR VARCHAR2(50) NOT NULL,
    REV_ITEM_BILL_DTL_ID_NBR NUMBER(16,0),
    PLAN_RACN_NBR NUMBER(10,0) NOT NULL,
    INV_DTL_IMG SYS.XMLType NOT NULL,
    NON_INV_DTL_IMG BLOB NOT NULL,
    PART_KEY_CD GENERATED ALWAYS AS (MOD(PLAN_RACN_NBR,5)) VIRTUAL,
    LAST_UPDT_TMSTP TIMESTAMP(6) NOT NULL,
    INV_ID_NBR NUMBER(16,0),
    ITEM_STATUS_CD VARCHAR2(1) DEFAULT 'A' NOT NULL
    LOB (NON_INV_DTL_IMG) STORE AS NON_IDI_LOB (CHUNK 8192 PCTVERSION 10 CACHE)
    TABLESPACE ECI_DATA
    PARTITION BY RANGE (PART_KEY_CD)
    PARTITION RIED_DAY0_PART
    VALUES LESS THAN (1)
    TABLESPACE ECI_DATA
    PARTITION RIED_DAY1_PART
    VALUES LESS THAN (2)
    TABLESPACE ECI_DATA
    PARTITION RIED_DAY2_PART
    VALUES LESS THAN (3)
    TABLESPACE ECI_DATA
    PARTITION RIED_DAY3_PART
    VALUES LESS THAN (4)
    TABLESPACE ECI_DATA
    PARTITION RIED_MAXVAL_PART
    VALUES LESS THAN (MAXVALUE)
    TABLESPACE ECI_DATA
    XMLTYPE COLUMN "INV_DTL_IMG" STORE AS OBJECT RELATIONAL
    XMLSCHEMA "someXdbDocument.xsd"
    ELEMENT "revenueInvoice"
    According to the documentation, I should be able to create a structured XMLIndex on the XMLType column with the following syntax:
    SQL> create index eci_schema.rev_item_earn_dtl_virt_xmlix on eci_schema.rev_item_earn_dtl_virtual
    2 (INV_DTL_IMG)
    3 INDEXTYPE IS XDB.XMLIndex
    4 parameters ('PATH TABLE RIED_PATH_TABLE')
    5 local;
    When I do this, I get the following error:
    create index eci_schema.rev_item_earn_dtl_virt_xmlix on eci_schema.rev_item_earn_dtl_virtual
    ERROR at line 1:
    ORA-29958: fatal error occurred in the execution of ODCIINDEXCREATE routine
    ORA-30959: The indexed column is not stored in CLOB.
    What am I doing wrong? Based on the Oracle documentation, I was under the impression that 11.2 XMLIndex would work with Object Relational storage. Is this not the case?

    CREATE INDEX ECI_SCHEMA.REV_ITEM_EARN_DTL_IX7
           ON ECI_SCHEMA.REV_ITEM_EARN_DTL
                      extractValue(inv_dtl_img, '/revenueInvoice/service/transportation/mstrTrkngNbr')
    TABLESPACE ECI_REV_ITEM_EARN_DTL_IX7_ITS
    LOGGING
    PARALLEL(DEGREE 8 INSTANCES 1)
    LOCAL
    /Elements that occur at most once in each document can be indexed using extractValue(). Despite the fact that the index appears to be a functional index, when we create the index we automatically re-write the create index into a normal btree index on the column that contains the value for the element identified by the xpath.
    Eg in the case of a functional index based on extractValue, defined on XMLType using Object relational storage, with an xpath that identifies a node that occurs at most once in each document is not a functional index, it's re-written into a plain old vanilla btree index. You can actually check this by looking in the system tables
    Eg
    SQL> connect system/oracle
    Connected.
    SQL> select table_name, index_name from all_indexes where owner = 'OE' and table_name = 'PURCHASEORDER';
    TABLE_NAME                     INDEX_NAME
    PURCHASEORDER                  LINEITEM_TABLE_MEMBERS
    PURCHASEORDER                  ACTION_TABLE_MEMBERS
    PURCHASEORDER                  SYS_C0011037
    SQL> alter session set current_schema = OE
      2  /
    Session altered.
    SQL> create unique index PO_REF_INDEX on PURCHASEORDER (extractValue(object_value,'/PurchaseOrder/Reference'));
    Index created.
    SQL> set lines 250
    SQL> select index_name, index_type from all_indexes where owner = 'OE' and table_name = 'PURCHASEORDER';
    INDEX_NAME                     INDEX_TYPE
    PO_REF_INDEX                   NORMAL
    LINEITEM_TABLE_MEMBERS         NORMAL
    ACTION_TABLE_MEMBERS           NORMAL
    SYS_C0011037                   NORMAL
    SQL> select * from dba_ind_expressions where table_name = 'PURCHASEORDER' and index_owner = 'OE'
      2  /
    no rows selectedFrom the above we can see that the index created on extractValue has been re-written in a plain old vanilla BTREE index, and there is no definition for it in dba_ind_expressions So assuming you were able to create the index and insert the data you should find that your index is not a functional index.
    ]

  • Extracting data from XML using xmltype and extract

    Hello all,
    I want to write a pl/sql functions that takes a clob as an input and return a some data extracted from the data passed into it.
    the input will be an xml similar to the following:
    <FIXML xsi:schemaLocation="http://www.finacle.com/fixml executeFinacleScript.xsd" xmlns="http://www.finacle.com/fixml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Header>
            <ResponseHeader>
                <RequestMessageKey>
                    <RequestUUID>IVR201306180841060310000000000000000</RequestUUID>
                    <ServiceRequestId>executeFinacleScript</ServiceRequestId>
                    <ServiceRequestVersion>10.3</ServiceRequestVersion>
                    <ChannelId>IVR</ChannelId>
                </RequestMessageKey>
                <ResponseMessageInfo>
                    <BankId>01</BankId>
                    <TimeZone></TimeZone>
                    <MessageDateTime>2013-06-18T05:36:55.918</MessageDateTime>
                </ResponseMessageInfo>
                <UBUSTransaction>
                    <Id/>
                    <Status/>
                </UBUSTransaction>
                <HostTransaction>
                    <Id/>
                    <Status>SUCCESS</Status>
                </HostTransaction>
                <HostParentTransaction>
                    <Id/>
                    <Status/>
                </HostParentTransaction>
                <CustomInfo/>
            </ResponseHeader>
        </Header>
        <Body>
            <executeFinacleScriptResponse>
                <ExecuteFinacleScriptOutputVO>
                    <executeFinacleScript_customData>
                        <DataCategory>ACC</DataCategory>
                        <New_Data>0001019300101001</New_Data>
                    </executeFinacleScript_customData>
                </ExecuteFinacleScriptOutputVO>
            </executeFinacleScriptResponse>
        </Body>
    </FIXML>'
    I want to extract the value of new_data.
    I wrote the following anonymous block to test the code :
    declare
    xparam xmltype;
    v_xpath varchar2(500);
    begin
    xparam:=xmltype('<FIXML xsi:schemaLocation="http://www.finacle.com/fixml executeFinacleScript.xsd"  xmlns="http://www.finacle.com/fixml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Header>
            <ResponseHeader>
                <RequestMessageKey>
                    <RequestUUID>IVR201306180841060310000000000000000</RequestUUID>
                    <ServiceRequestId>executeFinacleScript</ServiceRequestId>
                    <ServiceRequestVersion>10.3</ServiceRequestVersion>
                    <ChannelId>IVR</ChannelId>
                </RequestMessageKey>
                <ResponseMessageInfo>
                    <BankId>01</BankId>
                    <TimeZone></TimeZone>
                    <MessageDateTime>2013-06-18T05:36:55.918</MessageDateTime>
                </ResponseMessageInfo>
                <UBUSTransaction>
                    <Id/>
                    <Status/>
                </UBUSTransaction>
                <HostTransaction>
                    <Id/>
                    <Status>SUCCESS</Status>
                </HostTransaction>
                <HostParentTransaction>
                    <Id/>
                    <Status/>
                </HostParentTransaction>
                <CustomInfo/>
            </ResponseHeader>
        </Header>
        <Body>
            <executeFinacleScriptResponse>
                <ExecuteFinacleScriptOutputVO>
                    <executeFinacleScript_customData>
                        <DataCategory>ACC</DataCategory>
                        <New_Data>0001019300101001</New_Data>
                    </executeFinacleScript_customData>
                </ExecuteFinacleScriptOutputVO>
            </executeFinacleScriptResponse>
        </Body>
    </FIXML>');
    v_xpath:='//New_Data/text()';-
    dbms_output.put_line(xparam.EXTRACT(v_xpath).GETSTRINGVAL());
    end;
    but I get the following Error:
    dbms_output.put_line(xparam.EXTRACT(v_xpath).GETSTRINGVAL());
    end;
    Error at line 1
    ORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at line 46
    the problem is that when I remove : xmlns="http://www.finacle.com/fixml" attribute from the root node the code works correctly.
    of course , I can simply use replace to remove it, but I want to know what is causing the error.
    I am using oracle database 10g

    Let me explain that the issue is not only related to Oracle.
    If you google a bit for default namespace and Xpath you will find many topic.
    Basically when you have an XML having a definition of namespace without a prefix:
    i.e.:
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Example XHTML document</title>
      </head>
      <body>
        <p>Sample content</p>
      </body>
    </html>
    this means that all unprefixed elements are belonging to this default namespace.
    In this case an Xpath equal to '//title/text()' will not get anything because it is assuming to find the element title within a null namespace. But title in this case is automatically assigned to the default namespace.
    When you specify a prefix in a namespace then all elements without prefix are associated to namespace NULL. Using a default namespace is causing a lot of headache.
    These links can be giving a clearer picture:
    http://www.edankert.com/defaultnamespaces.html
    Assuming that you have data like this:
    WITH mydata AS
    (   SELECT '
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Example XHTML document</title>
      </head>
      <body>
        <p>Sample content</p>
      </body>
    </html>' xmldata FROM DUAL
    SELECT xmltype (xmldata).EXTRACT ('//title/text()').getstringval ()
      FROM mydata;
    This query will not give anything back to you. You will have to specify:
    SELECT xmltype (xmldata).EXTRACT ('//title/text()', 'xmlns="http://www.w3.org/1999/xhtml"').getstringval ()
      FROM mydata;
    Note also that you should be able to get the default namespace when it is specified (without prefix) by using:
    SELECT xmltype(xmldata).getnamespace() from mydata;
    Post your Oracle version to see if it something related to your version. In mine I got this:
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 20 18:32:58 2013
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> WITH mydata AS
      2  (   SELECT '
      3  <html xmlns="http://www.w3.org/1999/xhtml">
      4    <head>
      5      <title>Example XHTML document</title>
      6    </head>
      7    <body>
      8      <p>Sample content</p>
      9    </body>
    10  </html>' xmldata FROM DUAL
    11  )
    12  SELECT xmltype(xmldata).getnamespace() from mydata;
    XMLTYPE(XMLDATA).GETNAMESPACE()
    http://www.w3.org/1999/xhtml
    SQL>
    If this would work, then it would be enough to add the optional additional parameter namespace. In case it is null it will be set as xmlsn="" and it will work anyway:
    Please note that it will work both if the XML has a default namespace or not
    i.e.:
    with default namespace:
    SQL> DECLARE
      2     xparam         XMLTYPE;
      3     v_xpath        VARCHAR2 (500);
      4     v_ns           VARCHAR2 (500);
      5  BEGIN
      6     xparam :=
      7        xmltype ('
      8  <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ns="http://www.w3.org/1999/xhtml" >
      9    <head>
    10      <title>Example XHTML document</title>
    11    </head>
    12    <body>
    13      <p>Sample content</p>
    14    </body>
    15  </html>');
    16     v_xpath := '//title/text()';
    17     v_ns := 'xmlns="' || xparam.getnamespace () || '"';
    18     DBMS_OUTPUT.
    19      put_line (
    20        'Value of title:' || xparam.EXTRACT (v_xpath, v_ns).getstringval ());
    21  END;
    22  /
    Value of title:Example XHTML document
    PL/SQL procedure successfully completed.
    SQL>
    and without default namespace
    SQL> DECLARE
      2     xparam         XMLTYPE;
      3     v_xpath        VARCHAR2 (500);
      4     v_ns           VARCHAR2 (500);
      5  BEGIN
      6     xparam :=
      7        xmltype ('
      8  <html xmlns:ns="http://www.w3.org/1999/xhtml" >
      9    <head>
    10      <title>Example XHTML document</title>
    11    </head>
    12    <body>
    13      <p>Sample content</p>
    14    </body>
    15  </html>');
    16     v_xpath := '//title/text()';
    17     v_ns := 'xmlns="' || xparam.getnamespace () || '"';
    18     DBMS_OUTPUT.
    19      put_line (
    20        'Value of title:' || xparam.EXTRACT (v_xpath, v_ns).getstringval ());
    21  END;
    22  /
    Value of title:Example XHTML document
    PL/SQL procedure successfully completed.
    Regards.
    Al
    Message was edited by: AlbertoFaenza
    IF removed as it is working anyway.

  • BW 3.5 works with multiple nodes for authorizations

    Hi,
    Does BW 3.5 allow to do authorizations on mutiple nodes? It seems that from the How to wotk with hierarchy authorizations paper, the variable can only allow filtering 1 node. for 2.0B. We have requirements to allow viweing multiple nodes in a hierarchy.
    Thanks
    Will

    Hi Will,
    creat a hierarchy-node variable fill by authorizations in the frontend. The type has to be multiple entries (not single value). In RSSM at the hierarchy authorization creation you have to use the F4 for selecting nodes. The F4 allows to drag more nodes into the right frame.
    Cheers
    Peter

  • Using URLLoader to send and load multiple xml nodes

    I am trying to use the URLLoader class to send and load
    multiple chunks of xml to a php script. Essentially I have the
    following bit of XML:
    <pages>
    <page>page children here</page>
    <page>more page children here</page>
    <page>even more page children here</page>
    </pages>
    I'm using e4x to loop through the XML and isolate each page
    node. I then want to send each node to a php script to be written
    to a .xml file on the server.
    I've tried inserting the URLLoader.load method within the
    loop but it only sends the last iteration. Do I have to create a
    new URLLoader instance for each iteration and if so is there a way
    to dynamically set the instance names?
    I'm new to 3.0 and have had success doing this in 2.0. I
    mostly want to get it right and in good form.
    Thanks for any help!

    The URLLoader class allows you to send and load data in the
    same pass. As help suggests...sendToURL Sends a URL request to a
    server, but ignores any response. To examine the server response,
    use the URLLoader.load() method instead. The send and load works
    fine, my issue is with needing to send multiple xml chunks using a
    loop.
    Here's the basics of the code I'm using. I was thinking that
    the try{....} section could be put in a loop attempting to send
    multiple items to the PHP page but only the last iteration is
    actually sent. I know I'm making a fundamental error here but need
    direction.
    var urlLoader:URLLoader = new URLLoader();
    urlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    urlLoader.addEventListener(Event.COMPLETE, handleComplete);
    urlLoader.addEventListener(IOErrorEvent.IO_ERROR,
    ioErrorHandler);
    var variables:URLVariables = new URLVariables();
    variables.xml = "<some_node>some
    child</some_node>";
    var request:URLRequest = new
    URLRequest("sendAndLoadXML.php");
    request.method = URLRequestMethod.POST;
    request.data = variables;
    for each(blah){
    try {
    sendToURL(request);
    } catch (error:Error) {
    trace(\n***\nUnable to load requested document." + error);
    }

  • Multiple-node WebCenter Spaces config with default file-based policy

    hi,
    My customer will use web center 11g on multiple linux server, I noticed there is a comment in wc doc like this:
    =========================================
    The default file-based policy store can only be used for single-node WebCenter Spaces configurations. For multi-node configurations, you must reassociate the policy and credential store with an external LDAP-based store (such as Oracle Internet Directory) as described in Section 23.4, "Configuring the Policy and Credential Store."
    The policy store can be configured to use Oracle Internet Directory 11gR1 and 10.1.4.3, and OVD 11gR1 with the Local Store Adapter (LSA).
    The identity store can be configured to use the following LDAP servers:
    Oracle Internet Directory (OID) 11gR1 and 10.1.4.3
    Oracle Virtual Directory (OVD) 11gR1 and 10.1.4
    Sun iPlanet version 4.1.3
    Active Directory shipped as part of Windows 2000
    Open LDAP version 2.0.7
    Novell NDS version 8.5.1
    ========================================
    My customer only has AD, they don't have budget to buy oid at this time, according to the statement "The policy store can be configured to use Oracle Internet Directory 11gR1 and 10.1.4.3, and OVD 11gR1 with the Local Store Adapter (LSA).", does that mean the wc policy store can not use other ldap such as ad in multiple-node wc configuration?
    If performance is not an issue, can I use default file-based policy store in this case?
    If it's impossible for the customer to buy oid at this time, what's the possible solution?
    Thanks a lot!
    Regards

    You can configure directly with AD.
    Basically your WebLogic server needs to be configured to talk to AD. You can configure an Identity provider in Weblogic server which uses AD as LDAP.
    This should work in multi-node environment.
    Also, i do not see any reason why file based jazn-data should not work.
    Best solution from my perspective if Weblogic AD configuration does not work:
    Create and manage your users and roles in Weblogic embedded LDAP. All you have to change in your application is the realm to the name of weblogic realm(default is myrealm) and while deploying make sure you uncheck the create users and roles.
    Regards,
    Venkat

  • Extracting data from XML using  extractValue

    Given the following XML stored as xmlType in the database(table name
    :opfdata) , i woiuld like to query it using extractValue,existsNode to
    retrieve the title of the book (dc:Title).
    i wrote the following query
    select e.existsNode('/package/metadata/dc-metadata/dc-Title
    unique-identifier="uid"') from opfdata e;
    Gives result as 1.
    But if i run change existNode to extractValue it gives me an error
    daying the xpath expression is wrong.
    Any ideas?
    <package unique-identifier="uid"
    xmlns="http://openebook.org/namespaces/oeb-package/1.0/">
    <!-- Metadata follows, Dublin core plus any metadata extensions-->
    <metadata>
    <dc-metadata xmlns:dc="http://purl.org/dc/elements/1.0/"
    xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">
    <dc:Title>Midnight Come Again</dc:Title>
    <dc:Subject>Shugak, Kate (Fictitious character)
    Fiction.</dc:Subject>
    <dc:Subject>Women private investigators -- Alaska
    Fiction.</dc:Subject>
    <dc:Subject>Smuggling Fiction.</dc:Subject>
    <dc:Subject>Alaska Fiction.</dc:Subject>
    <dc:Subject>Mystery fiction.</dc:Subject>
    <dc:Identifier id="uid"
    scheme="DTB">us-nls-db00010</dc:Identifier>
    <dc:Creator role="aut">Dana Stabenow</dc:Creator>
    <dc:Source>ISBN-0-312-20596-1</dc:Source>
    <dc:Publisher>National Library Service for the Blind and
    Physically
    Handicapped</dc:Publisher>
    <dc:Date>2002-5</dc:Date>
    <dc:Format>ANSI/NISO Z39.86-2002</dc:Format>
    <dc:Description>Following the death of her lover, in Hunter's
    Moon (RC 49633), depressed Kate Shugak takes a job in a coastal
    village as a cargo pilot. Meanwhile Alaska state trooper Jim Chopin is
    sent there under cover to investigate Russian smugglers. Some explicit
    descriptions of sex, some violence, and some strong language. 2000.
    </dc:Description>
    <dc:Language>en</dc:Language>
    </dc-metadata>
    </package>

    Hi,
    First of all what is the result of the query
    select e.existsNode('/package/metadata/dc-metadata/dc-Title
    unique-identifier="uid"') from opfdata e;
    existsNode returns 1 if it finds the row and 0 if it doesn't find the node.
    The xpath which you need to give to retrieve to retrieve the title of the book is:
    '/package/metadata/dc-metadata/title'
    You can refer the following link to know more about existsNode and extractValue
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96620/xdb03usg.htm#1036760
    You can check the samples on XML DB which uses the different functionalities of Oracle XML DB.
    http://otn.oracle.com/sample_code/tech/xml/xmldb/content.html
    Check the Survey Sample which uses many features of XML DB. The sample is located at:
    http://otn.oracle.com/sample_code/tech/xml/survey/content.html
    and the various features used in the sample are explained in the page:
    http://otn.oracle.com/sample_code/tech/xml/survey/docs/AboutOracleXMLDB.html
    Regards,
    Anupama
    http://otn.oracle.com/sample_code/content.html

  • How to create the query with multiple node types

    Hi,
    I am having an issue in creating a query to search multiple node types.
    The requirement is to query documents/pages of the type dam:Asset and cq:Page present under a path.
    I tried the following code snippet with no luck .
    path=/content
    1_type=cq:Page
    2_type=dam:Asset
    property=jcr:content/metadata/@cq:tags
    property.1_value=<tag Name>
    I was able to write a query with single type. However i could not find any documents/ materials with multipe types as shown above.
    Thanks in advance.
    Regards
    Sudhi

    I don't think multiple type is possible. Instead use super type like nt:base that will cover both page and asset.
    Yogesh
    www.wemblog.com

Maybe you are looking for

  • Convert bsp_protcl :// bsp_server

    Hi together, hope anybody can help. For a project it`s required to open from a web dynpro application a BI report in a new window. I get the URL`s for the several reports form function module NAVIGATION_USER_MENU_READ. May problem is, that the URL`s

  • Exception during Mapping

    I am performing Message Mapping and getting following error <Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_MM_FCC_</Trace>   <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal E

  • Top Gear Series 22 Available In Canada

    Can someone (anyone) please tell me when Top Gear Season 22 will be available on iTunes Canada? The US has had it for three weeks already, but I'm not allowed to purchase it there... Why was it not released to Canada at the same time as the US?

  • Where have (most of) the BT Broadband newsgroups g...

    The only one that I can get, using Thunderbird, is "suggestions". The BT help pages show the following as the available choices - BT Broadband bt.broadband.announce - broadband service status announcements bt.broadband.suggestions - suggestions for B

  • Create a ADF component by Class.forName (11g)

    Hello, I'm loading a list of components by an XML, and I'd like to create an istance by Class.forName, for example: UIComponent componet = (UIComponent)Class.forName("oracle.adf.view.rich.component.rich.input.RichInputText").newInstance(); but the sy