The xmltype column search and listing content in relational format

Hi all

I have a database of GR 11, 1 subject table containing the xmltype column. I'm writing a query that displays conetents xml in a relational format.
SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jan 17 11:45:06 2013

Copyright (c) 1982, 2008, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
SQL > select * from v version $;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11 g Release 11.1.0.7.0 - 64 bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE Production 11.1.0.7.0
AMT for 64-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production

SQL > BULKMESSAGES Desc;
Name of Type Null
--------------- ---- -------------
TRANSFER_ID VARCHAR2 (100)
TRANSFER_LOGS XMLTYPE()
TRANSFER_RESULT VARCHAR2 (10)

SQL > select * from BULKMESSAGES
where TRANSFER_RESULT = "REFUSED."
/
TRANSFER_ID TRANSFER_LOGS TRANSFER_RESULT
---------------- ---------------------------------------------------------------- ---------------
T3217 < env:Envelope xmlns:env = 'http://www.w3.org/2003/05/soap-envelope' > REJECTED



Column of xmltype TRNASFER_LOGS stores the SOAP responses. Response SOAP sample (dummied) of the TRANSFER_LOGS xml column is below:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
     <env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"/>
     <env:Body xmlns:env="http://www.w3.org/2003/05/soap-envelope">
          <env:Fault xmlns:env="http://www.w3.org/2003/05/soap-envelope">
               <env:Code xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                    <env:Value xmlns:env="http://www.w3.org/2003/05/soap-envelope">env:Receiver</env:Value>
                    <env:Subcode xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                         <env:Value xmlns:fault="http://www.es.com/soapfaults" xmlns:env="http://www.w3.org/2003/05/soap-envelope">fault:MessageBlocked</env:Value>
                    </env:Subcode>
               </env:Code>
               <env:Reason xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                    <env:Text lang="en" xmlns:env="http://www.w3.org/2003/05/soap-envelope">connection rejected</env:Text>
               </env:Reason>
               <env:Detail xmlns:fault="http://www.es.com/soapfaults" fault:type="faultDetails" fault:messageId="0000013a6" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                    <fault:path policy="Request Message">
                         <fault:filter status="Fail" name="Call 'Process request '">
                              <fault:path policy="Process xml ">
                                   <fault:filter status="Fail" name="Call 'Call 3rdparty service'">
                                        <fault:path policy="Call external service">
                                             <fault:filter status="Pass" name="Extract message"/>
                                        </fault:path>
                                   </fault:filter>
                              </fault:path>
                         </fault:filter>
                    </fault:path>
                    <fault:attributes>
                         <fault:attribute name="monitoring.enabled" value="true"/>
                         <fault:attribute name="requestor" value="none"/>
                         <fault:attribute name="circuit.failure.reason" value="connection rejected"/>
                         <fault:attribute name="message_protocol" value="SOAP"/>
                         <fault:attribute name="user_id" value="31274556"/>
                         <fault:attribute name="ws_name" value="PUSHDOC"/>
                         <fault:attribute name="user.enabled" value="N"/>
                         <fault:attribute name="http.request.clientaddr" value="/10.254.123.44:43840"/>
                         <fault:attribute name="soap_action" value="pushDocument"/>
                         <fault:attribute name="message.reception_time" value="1349769769742"/>
                         <fault:attribute name="user.api_logging_flag" value="Y"/>
                         <fault:attribute name="circuit.exception" value="com.es.circuit.CircuitAbortException: connection rejected"/>
                         <fault:attribute name="end_point" value="https://es.live.com/pdfs"/>
                         <fault:attribute name="message.protocol.type" value="http"/>
                         <fault:attribute name="user.incoming_date" value="09-11-2013 09:02:49"/>
                         <fault:attribute name="http.destination.host" value="es.live.com"/>
                         <fault:attribute name="message.local.address" value="/100.25.40.82:8085"/>
                         <fault:attribute value="N"/>
                    </fault:attributes>
               </env:Detail>
          </env:Fault>
     </env:Body>
</env:Envelope>
My goal is to search for documents TRANSFER_LOGS for lines that contain flaws: attribute name = "circuit.exception". Then report "fault: name attribute" and their values in relational format. For example:
TRANSFER_ID    TRANSFER_RESULT FAULT_FAIL_REASON    FAULT_CIRCUIT_EXCEPTION                               FAULT_WS_NAME   FAULT_DESTINATION_HOST
----------     --------------- ----------------     -------------------------------------------------------- -------------   ---------------------
T3217          REJECTED       CONNECTION REJECTED  com.es.circuit.CircuitAbortException: connection rejected  PUSHDOC       es.live.com
I am new to oracle XML sql querying. Documents in the column of xmltype TRANSFER_LOGS have many namespaces and the query I've tried does not work. So, any help or pointers to search and extract TRANSFER_LOGS in above format is greatly appreciated.

Thanks in advance.

VC

Hello

You can use something like this:

SQL> select t.transfer_id, t.transfer_result, x.*
  2  from bulkmessages t
  3     , xmltable(
  4         xmlnamespaces(
  5           'http://www.w3.org/2003/05/soap-envelope' as "e"
  6         , 'http://www.es.com/soapfaults' as "f"
  7         )
  8       , '/e:Envelope/e:Body/e:Fault/e:Detail/f:attributes'
  9         passing t.transfer_logs
 10         columns
 11           FAULT_FAIL_REASON       varchar2(200) path 'f:attribute[@name="circuit.failure.reason"]/@value'
 12         , FAULT_CIRCUIT_EXCEPTION     varchar2(200) path 'f:attribute[@name="circuit.exception"]/@value'
 13         , FAULT_WS_NAME           varchar2(200) path 'f:attribute[@name="ws_name"]/@value'
 14         , FAULT_DESTINATION_HOST  varchar2(200) path 'f:attribute[@name="http.destination.host"]/@value'
 15         ) x
 16  where xmlexists(
 17         'declare namespace e = "http://www.w3.org/2003/05/soap-envelope"; (: :)
 18          declare namespace f = "http://www.es.com/soapfaults"; (: :)
 19          /e:Envelope/e:Body/e:Fault/e:Detail/f:attributes/f:attribute[@name="circuit.exception"]'
 20          passing t.transfer_logs
 21        ) ;

TRANSFER_ID     TRANSFER_RESULT FAULT_FAIL_REASON        FAULT_CIRCUIT_EXCEPTION                                       FAULT_WS_NAME    FAULT_DESTINATION_HOST
--------------- --------------- ------------------------ ------------------------------------------------------------- ---------------- -------------------------
T3217           REJECTED        connection rejected      com.es.circuit.CircuitAbortException: connection rejected     PUSHDOC          es.live.com
 

Or, more simply:

SQL> select t.transfer_id, t.transfer_result, x.*
  2  from bulkmessages t
  3     , xmltable(
  4         xmlnamespaces(
  5           'http://www.w3.org/2003/05/soap-envelope' as "e"
  6         , 'http://www.es.com/soapfaults' as "f"
  7         )
  8       , '/e:Envelope/e:Body/e:Fault/e:Detail/f:attributes'
  9         passing t.transfer_logs
 10         columns
 11           FAULT_FAIL_REASON       varchar2(200) path 'f:attribute[@name="circuit.failure.reason"]/@value'
 12         , FAULT_CIRCUIT_EXCEPTION     varchar2(200) path 'f:attribute[@name="circuit.exception"]/@value'
 13         , FAULT_WS_NAME           varchar2(200) path 'f:attribute[@name="ws_name"]/@value'
 14         , FAULT_DESTINATION_HOST  varchar2(200) path 'f:attribute[@name="http.destination.host"]/@value'
 15         ) x
 16  where x.FAULT_CIRCUIT_EXCEPTION is not null ;

TRANSFER_ID    TRANSFER_RESULT FAULT_FAIL_REASON      FAULT_CIRCUIT_EXCEPTION                                      FAULT_WS_NAME      FAULT_DESTINATION_HOST
-------------- --------------- ---------------------- ------------------------------------------------------------ ------------------ --------------------------
T3217          REJECTED        connection rejected    com.es.circuit.CircuitAbortException: connection rejected    PUSHDOC            es.live.com
  

Tags: Oracle Development

Similar Questions

  • ADF and the use of the XMLType columns

    After discovering the Jdeveloper 11 g was able to generate business components/data controls for complex web services (see this tutorial excellet http://www.oracle.com/technology/tech/fmw4apps/agile/pdf/adf11g-agile.pdf), I assumed that jdev 11 g should now have the same capacity on XMLtype columns with a registered scheme, and was therefore a good match for our enforcement objectives be able to edit
    parts of an XML document to aid in the face of components and Assembly/store the document in a way centic document in a relational/XML database XMLType column hybrid.

    I tested this point, has created a table with an XMLType column binary, saved the schema in database (11g) and jdev(11g) and generated my components.


    I was very disappointed at the discovery of the structure of data controls stops at the level of the attribute in the table (ie the XMLType column), so none of the structure of the XML document is revealed or can be used in a meaningful way through data control.

    Am I missing something here? should not control data generated reveal the XML structure and allow the use of components of forms/table faces on some parts of the structure of the document? I'm not a java programmer, so was really hoping to do this with data not generated controls beans not.

    If it is just to treat it as a CLOB, what's the point of registered xsd schemas?

    Yes, it is through java. Sorry

  • Trying to create a Section to multiple columns with Sections of the single column before and after

    Is there a way to create a section break that is not default to a new page after I created columns on a page.  I created the columns and under them, I want to return to the normal formatting for the rest of the single page.  See picture attached.

    Any rejection of Pages v5 has a break of presentation which was present in the Pages ' 09 v4.3. This will allow you to transition to several columns and back to single column on the same page. In the v5 Pages, you can insert 3 text boxes and change the 3-column layout in the Middle text box. You use the toolbar item Insert to inject column breaks when you want to start a new list in the next column. I'll show this screenshot below.

    You can fake your layout in Pages v5 using 3 text boxes and setting 3 columns in the Central text area. Better to show the mode of provision for this and in a text box, the column outlines are not displayed. After each column list, you then choose column break the Insert point toolbar menu to move to the next column, add a list, repeat. Each column will expand downwards. Click on the following to enlarge.

    Pages ' 09 v4.3 using layout breaks Pages using 3 text boxes V5.6.1                                                      

      

  • Need to hide options "filter, search and list of exports.

    Hi, we can hide the filter, search and list export options in the user interface. Please see the summary below.

    Hiding.JPG

    You cannot change the user interface for existing objects of vSphere.

    You do not have your own list of objects in support of these options:

    -Sort and export icons will not be displayed if you specify no sortProperty or exportProperty in your list of ColumnDataSourceInfo.

    -The filter box will always be there but will be inactive if your data provider does not support a node PropertyConstraint with Comparator.TEXTUALLY_MATCHES (see example of frame-app)

  • What is the default size of the XMLType column?

    I have a table with 1 type of crude and 1 XMLType column. In the XMLType column I'm inserting XML, more

    < ocaStatus xmlns = "http://xmlbeans.apache.org/ocastatus" >
    < status >
    < > 990 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2010 - 01 - 19 < / statusDate >
    < user name > OcaNimsAcf < / userId >
    < comment > DocumentnotinNIMS < / comment >
    < / status >
    < status >
    < > 990 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2010 - 01 - 19 < / statusDate >
    < user name > OcaNimsAcf < / userId >
    < comment > DocumentnotinNIMS < / comment >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 09 - 16 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 09 - 16 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 09 - 16 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 29 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 29 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 28 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 28 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 27 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 26 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 25 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 20 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 20 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 20 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < statusCode > 306 < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 04 - 21 < / statusDate >
    < user name > u0075970 < / userId >
    < / status >
    < status >
    < > 301 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 02 - 05 < / statusDate >
    < user name > DMS_WORKFLOW < / userId >
    < comment > < / comment >
    < / status >
    < status >
    < > 990 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2010 - 01 - 17 < / statusDate >
    < user name > OcaNimsAcf < / userId >
    < comment > Comparedfornimsacf < / comment >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 09 - 16 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 09 - 16 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 09 - 16 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 29 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 29 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 28 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 28 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 27 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 26 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 25 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 22 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 21 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 20 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 20 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < > 501 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 08 - 20 < / statusDate >
    < user name > oca_scheduled_job < / userId >
    < / status >
    < status >
    < statusCode > 306 < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 04 - 21 < / statusDate >
    < user name > u0075970 < / userId >
    < / status >
    < status >
    < > 301 statusCode < / statusCode >
    < statusDateclass = "sql-date' > 2008 - 02 - 05 < / statusDate >
    < user name > DMS_WORKFLOW < / userId >
    < comment > < / comment >
    < / status >
    < / ocaStatus >

    The XML is very long. For insertion in the table, I use xmlparse() function to get XMLType.
    While doing this I'm ORA-01704: string literal too long error. It is said can accommodate maximum 4,000 characters.
    I guess that XMLType is stored as a default CLOB. So it should allow more than 4000 characters.
    How can I store data xml with more than 4000 characters.

    Thank you.

    XMLParse is a SQL function, you cannot use a string literal is longer than 4000 characters.

    Instead, you can declare a PL/SQL VARCHAR2 variable, which can contain up to 32 k characters and use the XMLType constructor:

    DECLARE
    
     xmlstr VARCHAR2(32767) := '';
     xmldoc xmltype;
    
    BEGIN
    
     xmldoc := xmltype(xmlstr);
     INSERT INTO your_table(xml_data) VALUES(xmldoc);
    
    END;
    

    For strings longer than 32 k, you may need to load it from a file.

  • Help - query on the XMLType column?

    Hello

    Please could someone help me to write a query to extract data from XMLType column in the script below:

    Here is my example of WHAT XML stored in the XMLType column:
     <?xml version="1.0" encoding="UTF-8"?>
    <cf:IncidentReportGroup xmlns:cf="http://xml.crossflo.com/jxdm/3.0.3"
    xmlns:j="http://www.it.ojp.gov/jxdm/3.0.3" xmlns:ext="http://xml.crossflo.com/jxdm/3.0.3/extension"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:i="http://www.it.ojp.gov/jxdm/appinfo/1">
        <cf:IncidentReport>
            <ext:Incident>
                <j:ActivityID>
                    <j:ID>99999999999999</j:ID>
                </j:ActivityID>
                <j:ActivityDate>2007-01-13</j:ActivityDate>
                <j:ActivityTime>01:25:00Z</j:ActivityTime>
            </ext:Incident>
        </cf:IncidentReport>
    </cf:IncidentReportGroup>
    I want to retrieve ActivityDate and ActivityTime where ActivityID/ID = 'something'...

    Here is the example query I wrote but no luck:
    SELECT extractValue(xml_doc, '/cf:IncidentReport/ext:Incident/j:ActivityDate','/cf:IncidentReport/ext:Incident/j:ActivityTime')
      FROM TABLEA 
      where existsNode(xml_doc,'/cf:IncidentReport/ext:Incident/j:ActivityID[j:ID="99999999999999"]')
     
    SQL>  var ID varchar2(20)
    
    SQL>  exec :ID := '99999999999999'
    PL/SQL procedure successfully completed.
    
    SQL>  with t as (
     select xmltype('
    
        
            
                
                    99999999999999
                
                2007-01-13
                01:25:00Z
            
        
    ') xml from dual
    )
    select t2.*
      from t t, xmltable(xmlnamespaces('http://xml.crossflo.com/jxdm/3.0.3/extension' as "ext",
                                       'http://www.it.ojp.gov/jxdm/3.0.3' as "j"),
                         'ext:Incident[j:ActivityID/j:ID=$ID]'
                         passing t.xml.extract('//ext:Incident','xmlns:ext="http://xml.crossflo.com/jxdm/3.0.3/extension"'),
                                 xmlelement(ID, :ID) as ID
                         columns ActivityID   varchar2(10) path 'j:ActivityID',
                                 ActivityDate varchar2(10) path 'j:ActivityDate',
                                 ActivityTime varchar2(10) path 'j:ActivityTime') t2
    /
    ACTIVITYID ACTIVITYDA ACTIVITYTI
    ---------- ---------- ----------
    9999999999 2007-01-13 01:25:00Z
    1 row selected.
    

    Published by: michaels2 on March 2, 2009 08:43

  • I'm unable to uninstall Windows Media Player 11, because it seems that the hidden folder $NtUninstallwmp11$ and its content have been accidentally deleted from my computer.

    I'm unable to uninstall Windows Media Player 11, because it seems that the hidden folder $NtUninstallwmp11$ and its content have been accidentally deleted from my computer by another software. I want to go back to the previous version of Windows Media Player (WMP10). Please let me know how to uninstall WMP11 or back to WMP10.

    Please note that the process mentioned in this MS article did not.
    http://support.Microsoft.com/kb/934372
    Thanks in advance.
    original title: impossible to uninstall WMP11

    Hello

    Try to restore the system to the date and time when the computer was working fine.

    Click on the link below.

    http://support.Microsoft.com/kb/306084

    If you are still experiencing a problem, I suggest you try to post in the link mentioned below.

    http://social.technet.Microsoft.com/forums/en-us/category/windowsxpitpro

  • Installed Adobe export in PDF and nothing comes up under the top right drop-down list export in PDF format

    Installed Adobe export in PDF and nothing comes up under the top right drop-down list export in PDF format

    Hi grahame52757429,

    Try to 'Repair Installation' under the menu help.

    Make sure you have last DC of Reader Acrobat installed on your system.

    In the meantime you can also use service to export in PDF format online. https://cloud.Acrobat.com/EXPORTPDF

    Kind regards

    Meenakshi

  • [CS5 JS] excluding the Notes of search and replace

    Hello

    Does anyone know how to exclude all text within a Note of a search/replace, text or grep operation?

    I went through and systematically all the findChangeGrepOptions that had the word "include" in false:

    includeLockedStoriesForFind: false

    includeLockedLayersForFind: false

    includeHiddenLayers: false

    includeMasterPages: false

    includeFootnotes: false

    just to check, but nothing has worked. myText.changeGrep () has again changed the text in the note.

    Of course, it would be pretty easy to write a wrapper function

    var myChangeGrep = function( textObject, checkNotes ) {
       checkNotes = checkNotes || false;
       results = [];
    
      // Go through and run changeGrep on all the 
      // parts of the textObject that are not contained inside Notes, 
      // (or just run it on the entire textObject if checkNotes is true),
      // and push the results to the results array as we go along.
    
      return results;
    };
    

    but it has the disadvantage that it returns a table and not a collection of InDesign, as does the regular changeGrep. In addition, as simple as it may be, it would be easier if there was a preference somewhere to take care of this.

    Any idea?

    Thank you!

    There is no preference for that: the scope of search and replace can be set only with five preferences that you have already tried. (In the same way, you can not include/exclude tables.) findGrep() and changeGrep() return an array, for that matter, not a collection.

  • Add to the XMLTYPE column

    Hello

    I have a requirement to insert a new XML tag in the existing XMLTYPE column.

    Oracle version: Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production

    create table rds_xml_config (module_name varchar2 (32), module_type varchar2 (100), config_xml xmltype);

    insert into rds_xml_config values ('TRANSMIT_SEQ', 'INTERFACE',' < transmit_seq > <!-file sequence number will be updated after each race-> < file = "RTP" Type_de_fichier > < file_seq_num > 2457 < / file_seq_num > < / file > < file Type_de_fichier = 'RTS' > < file_seq_num > 2453 < / file_seq_num > < / file > < Type_de_fichier = "RTL" file > < file_seq_num >) 2522 < / file_seq_num > < / file > < / transmit_seq > ');

    I have to add < file = "RTX" Type_de_fichier > < file_seq_num > 0 < / file_seq_num > < / file >.

    As a temporary work around, I used below the update statement.

    Update rds_xml_config

    Set config_xml =' < transmit_seq > <!-file sequence number will be updated after each race-> < file = "RTP" Type_de_fichier > < file_seq_num > 2457 < / file_seq_num > < / file > < file Type_de_fichier = 'RTS' > < file_seq_num > 2453 < / file_seq_num > < / file > < Type_de_fichier = "RTL" file > < file_seq_num > 2522 < / file_seq_num > < / file > < file = "RTX" file_type > < file_seq_num > 0 < / file_seq_num > < / file > < / transmit_seq > '

    WHERE module_type = "INTERFACE".

    AND module_name = "TRANSMIT_SEQ";

    SEQ numbers will be modified for each race of the file, so I cannot use the work temporary around during migration to production, have we a way to add new XMLtag.

    Thank you

    Rambeau

    Search in INSERTCHILDXML

    http://docs.Oracle.com/CD/B19306_01/server.102/b14200/functions066.htm

    SQL> select a.config_xml.extract('*') old_xml
      2       , insertchildxml(config_xml, '/transmit_seq', 'file',xmltype('10000')).extract('*') new_xml
      3    from rds_xml_config a;
    
    OLD_XML                                                                                              NEW_XML
    ---------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------
                                                                                           
                                                 
                                                                                     
        2457                                                                 2457
                                                                                                    
                                                                                     
        2453                                                                 2453
                                                                                                    
                                                                                     
        2522                                                                 2522
                                                                                                    
                                                                                            
                                                                                                             10000
                                                                                                           
                                                                                                         
    
  • excerpt from the XMLType column

    In my XMLType column I'm storing XML content that is the xml below.

    <? XML version = "1.0" encoding = "UTF-8"? >

    < project >

    < basics >

    < attribute name = "Id" > 3197915 < / attribute >

    < attribute name = "Name" > 345 < / attribute >

    < attribute name = "Révision" / >

    < name of attribute 'Type' = > project < / attribute >

    < / basics >

    < relationship / >

    < children >

    < application >

    < basics >

    < name of attribute 'Type' = > Application < / attribute >

    < attribute name = "Name" > rty < / attribute >

    < = "Scope" attribute name > SCOPE_PROJECT < / attribute >

    < attribute name = "Révision" / >

    < attribute name = "Id" > 3197918 < / attribute >

    < / basics >

    < relationship type = "Project relationship Configuration" >

    < attribute name = "Subclassification subcomponent" / >

    < attribute name = 'Type of subcomponent' / >

    < attribute name = "Quantity" > 1 < / attribute >

    < attribute name = "Unit of measurement" / >

    < = "Scope" attribute name > SCOPE_PROJECT < / attribute >

    < attribute name = "Post number" / >

    < attribute name = "Additional Information" / >

    < / relationship >

    < children / >

    < / application >

    < typical >

    < basics >

    < name of attribute 'Type' = > rrrr < / attribute >

    < attribute name = "Name" > rrr_Mo < / attribute >

    < attribute name = "Id" > 944674 < / attribute >

    < = "Scope" attribute name > SCOPE_GLOBAL < / attribute >

    < attribute name = "Révision" / >

    < / basics >

    < children / >

    < / typical >

    < application >

    < basics >

    < name of attribute 'Type' = > Application < / attribute >

    < attribute name = "Name" > yu123 < / attribute >

    < = "Scope" attribute name > SCOPE_PROJECT < / attribute >

    < attribute name = "Révision" / >

    < attribute name = "Id" > 3197922 < / attribute >

    < / basics >

    < children / >

    < / application >

    < / children >

    < / project >

    How to write a query to extract the Application name?

    Here, it should return "anais" and "yu123".

    I'm using Oracle 11 g.

    Thanks in advance.

    Something like the following, where TMP_XML. DOC is my XMLType column:

    SQL> select x.*
      2  from tmp_xml t
      3     , xmltable('/Project/Children/Application/Basics'
      4         passing t.doc
      5         columns application_name varchar2(30) path 'Attribute[@Name="Name"]'
      6       ) x
      7  ;
    
    APPLICATION_NAME
    ------------------------------
    rty
    yu123
    
  • Cannot load in the XMLTYPE column

    HI gentlemen,

    I have enormous difficulty with loading the XML content in an XMLTYPE column. Here's the annotated schemas:
    SQL> select any_path from resource_view where any_path like '%GKSADMIN/ICD%';
    
    ANY_PATH                                                                        
    --------------------------------------------------------------------------------
    /sys/schemas/GKSADMIN/ICD                                                       
    /sys/schemas/GKSADMIN/ICD/datentypen_V1.40.xsd                                  
    /sys/schemas/GKSADMIN/ICD/ehd_header_V1.40.xsd                                  
    /sys/schemas/GKSADMIN/ICD/ehd_root_V1.40.xsd                                    
    /sys/schemas/GKSADMIN/ICD/icd_body.xsd                                          
    /sys/schemas/GKSADMIN/ICD/icd_header.xsd                                        
    /sys/schemas/GKSADMIN/ICD/icd_root.xsd                                          
    /sys/schemas/GKSADMIN/ICD/keytabs_V1.40.xsd                                     
    
    8 Zeilen ausgewählt.
    And here's the relational table:
    SQL> describe icd
     Name                                      Null?    Typ
     ----------------------------------------- -------- ----------------------------
     ID                                                 CHAR(2)
     XML_DOCUMENT                                       SYS.XMLTYPE(XMLSchema "ICD/i
                                                        cd_root.xsd" Element "ehd") 
                                                        STORAGE Object-relational TY
                                                        PE "ICD$ICD_ROOT_TYP"
    Now, when I try to load a document instance (which proved OK with xmloracle), the following occurs:
    SQL> @loadxmlfileascolumn_int
    Geben Sie einen Wert für source_directory ein: c:\gks\kbv\c\icd\xml
    alt   1: create or replace directory SOURCE_DIR as '&source_directory'
    neu   1: create or replace directory SOURCE_DIR as 'c:\gks\kbv\c\icd\xml'
    
    Verzeichnis wurde erstellt.
    
    Geben Sie einen Wert für xmltypetable ein: icd
    alt   4:   INSERT INTO &XMLTypeTable
    neu   4:   INSERT INTO icd
    Geben Sie einen Wert für id ein: 01
    Geben Sie einen Wert für instancedocument ein: icdtest.xml
    alt   5:     VALUES (&id, XMLType(bfilename('SOURCE_DIR', '&InstanceDocument'),
    neu   5:     VALUES (01, XMLType(bfilename('SOURCE_DIR', 'icdtest.xml'),
    declare
    *
    FEHLER in Zeile 1:
    ORA-01830: Datumsformatstruktur endet vor Umwandlung der gesamten 
    Eingabezeichenfolge 
    ORA-06512: in Zeile 4 
    
    
    SQL> spool off
    Because the patterns are very big, I took only one to show the relevant parts:
        <ehd:document_type_cd V="ICD" DN="ICD-Stammdatei" S="1.2.276.0.76.5.100"/>
        <ehd:service_tmr V="2010-01-01..2010-12-31"/>
        <ehd:origination_dttm V="2009-11-10+01:00"/>
    Guilty is allegedly origination_dttm with its time zone. However, consider the resolution of type below that leads to XS: date. This should be able to accommodate the time zone as well.
         <!-- ************************ origination_dttm_typ ********************************* -->
         <xs:element name="origination_dttm" type="origination_dttm_typ">
              <xs:annotation>
                   <xs:documentation>Erstellungsdatum</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="origination_dttm_typ">
              <xs:complexContent>
                   <xs:extension base="v_date_typ"/>
              </xs:complexContent>
         </xs:complexType>
    
         v_date_typ: enthält nur den V-Attribut für einfache Datums-Angaben
    
         <!-- ************************ v_date_typ ********************************** -->
         <xs:complexType name="v_date_typ">
              <xs:attribute name="V" type="xs:date" use="required"/>
         </xs:complexType>
    When I delete the passage of time zone in the document instance, it works again.
    (However, another error will be reported then - another question.)

    Can you help me to know what is the problem? Is this my error or a bug?

    Thank you, best regards,.

    Miklós HERBOLY

    Published by: mh * July 3, 2011 10:55

    It's Oracle functionality (at least in 11g R2). See working with zones of the XML DB Developer's Guide: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16659/xdb05sto.htm#autoId62

    The chapter also includes an example how to adjust the schema with Oracle specific annotation.

    See also http://stackoverflow.com/questions/6370035/why-dbms-xmlschema-fails-to-validate-a-valid-xsdatetime/6382096#6382096

    Published by: 836290 on July 4, 2011 07:56

  • Compare the values of the XMLType column to two different lines using XMLDiff in GR 11, 2

    I have a table of data with a row of XMLType and I need a way to compare the XML data against the other. I guess I could use a function and return a XMLDIFF base output to the caller, but the function logic is a bit fuzzy. Would be nice to format the output finally in a table format.

    I looked on http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions241.htm#SQLRF20025 and output in a format of table as shown in Re: how to find compare and identify between xmldocs .

    I ran across some examples do not explain the best way to compare the XML code that is in the best performing XMLType column.

    Any help would be appreciated.

    Are you referring to different rows in the same table or different tables or?

    Basically, you need to change the example of Odie so that the XMLDiff retrieves the XML from places in Pb, say something like

    XMLDIFF(SELECT aXml FROM table WHERE ...,
            SELECT bXml FROM table WHERE ...)
    

    This allows to avoid bringing the XML of the DB in the client code.

    Don't know if that's what you're looking for, but hopefully it helps a little.

  • Select in the XMLTYPE column

    I have table with column recid and xmlrecord (xmltype) trailer


    < row id = "52843' XML: Space ="preserve">
    < c1 > refund of payment order internal < / c1 >
    Ref Dom Py < c2 > or < / c2 >
    PLl < c3 > < / c3 >
    < c20 > 1 < / c20 >
    62_TAABSINPUTT___OFS_TAABS < c21 > < / c21 >
    < c22 > 0803181605 < / c22 >
    62_TAABSINPUTT_OFS_TAABS < c23 > < / c23 >
    SA0010001 < c24 > < / c24 >
    < c25 > 1 < / c25 >
    < / row >

    I need to select in the table where < c24 > = SA0010001

    need help please

    If you would have displayed the XML path with knots, I can provide the SQL with full path, but try to use the below SQL change path SQL and root

    select extractValue(object_value, '//C24')
    as Id
    from invoicexml_tbl;
    
    If you want to use in WHERE clause, use existsnode method
    
    select * from invoicexml_tbl
    where existsNode(object_value, '//row[c24="SA0010001"]') = 1;
    
  • How to use SQL * Loader to load the XMLType column with other columns?

    Hello

    I try to use sqlldr to load an XML file into a table with an XMLType column. I have found many examples where the entire table is an xmltype, but I'd like to load a lot of XML objects in a generic table for treatment with a single XMLType column and other columns to identify the load. A simple example, I have a constant column which I want to put during the download.

    The following example does not work: (.) No error either.

    create the table xml_upload
    (the varchar2 (10) of upload_type not null,)
    donnees_xml XMLType)
    /

    my control file:
    DOWNLOAD THE DATA
    INFILE * add
    IN THE TABLE xml_upload
    XMLType (xml_data)
    FIELDS ENDED BY ',' POSSIBLY FRAMED BY "" "
    (
    constant upload_type MARKET,
    donnees_xml
    )
    BEGINDATA
    < SALE_ORDER >
    TIM < CUST_CODE > < / CUST_CODE >
    < ORDER_NUM > 1234 > < / ORDER_NUM >
    < / SALE_ORDER >


    $ sqlldr my.ctl

    SQL * Loader: Release 10.2.0.4.0 - Production on Sun Sep 27 22:51:52 2009

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    Commit the point reached - the number of logical records 4

    SQL > select * from xml_upload;
    no selected line
    SQL >

    Any ideas on how I can do this? Did I miss something...

    I also played with the clause sqlldr lobfile, also without success.

    Current database version is 10g R2.

    Thank you
    Tim.

    The following works in 11.1.0.6

    LOAD DATA
    INFILE *
    INTO TABLE xml_upload TRUNCATE
    (
     upload_type constant 'MARKET'
    ,file_name filler char(100)
    ,xml_data LOBFILE (file_name) TERMINATED BY EOF
    )
    BEGINDATA
    test.xml
    
    SQL> select upload_type,xmlserialize(document xml_data no indent) from xml_upload;
    
    UPLOAD_TYP XMLSERIALIZE(DOCUMENTXML_DATANOINDENT)
    ---------- ----------------------------------------------------------------------
    MARKET        1
    
    SQL> 
    

Maybe you are looking for