How to extract my XML data

{color: #800000} Dear friends,
It's kind of a matter of newbie on XML queries. Our DotNet developers send documents to xml by CLOB column. So I want to extract data from an xml file
Please help me...

I will wait for the response

Title Description
--------------------------------
Project Title01
Title02 demo
Title03 test


Is this possible...? {color}
It's xml content:

"& lt; NewDataSet & gt;
& lt; Schema id = "NewDataSet" xmlns = "" xmlns: XS = "http://www.w3.org/2001/XMLSchema" xmlns:msdata = "urn: schemas-microsoft-com: xml-msdata"& gt;
& lt; xs: element name = "NewDataSet" msdata:IsDataSet = "true" msdata:MainDataTable = "planAddfield" msdata:UseCurrentLocale = "true" & gt;
& lt; complexType & gt;
& lt; xs: Choice minOccurs = "0" maxOccurs = "unbounded" & gt;
& lt; xs: element name = "planAddfield" & gt;
& lt; complexType & gt;
& lt; xs: Sequence & gt;
& lt; xs: element name = "Sno" type = "xs: int" minOccurs = "0" / & gt;
& lt; xs: element name = "Title" type = "xs: String" minOccurs = "0" / & gt;
& lt; xs: element name = "Description" type = "xs: String" minOccurs = "0" / & gt;
& lt; xs: element name = "Flag" type = "xs: int" minOccurs = "0" / & gt;
& lt; / xs: Sequence & gt;
& lt; / xs: complexType & gt;
& lt; / xs: ELEMENT & gt;
& lt; / xs: Choice & gt;
& lt; / xs: complexType & gt;
& lt; / xs: ELEMENT & gt;
& lt; / xs: Schema & gt;
& lt; planAddfield & gt;
& lt; SNO & gt; 0 & lt; / Sno & gt;
& lt; Title & gt; Title01 & lt; / title & gt;
& lt; Description & gt; project & lt; / Description & gt;
& lt; Flag & gt; 0 & lt; / flag & gt;
& lt; / planAddfield & gt;
& lt; planAddfield & gt;
& lt; SNO & gt; 0 & lt; / Sno & gt;
& lt; Title & gt; Title02 & lt; / title & gt;
& lt; Description & gt; Demo & lt; / Description & gt;
& lt; Flag & gt; 0 & lt; / flag & gt;
& lt; / planAddfield & gt;
& lt; planAddfield & gt;
& lt; SNO & gt; 0 & lt; / Sno & gt;
& lt; Title & gt; Title03 & lt; / title & gt;
& lt; Description & gt; test & lt; / Description & gt;
& lt; Flag & gt; 0 & lt; / flag & gt;
& lt; / planAddfield & gt;
& lt; / NewDataSet & gt; »

Hello
This will make...

DECLARE
    x   XMLTYPE := XMLTYPE('
    
        
            
                
                    
                        
                            
                                
                                
                                
                                
                            
                    
                    
                
            
        
    
    
        0
        Title01
        project
        0
    
    
        0
        Title02
          demo
          0
     
     
          0
          Title03
          test
          0
     
');
BEGIN
    FOR i IN ( SELECT  EXTRACTVALUE(VALUE(t), '/planAddfield/Title') title,
                       EXTRACTVALUE(VALUE(t), '/planAddfield/Description') description
                FROM TABLE(XMLSEQUENCE(x.EXTRACT('NewDataSet/planAddfield'))) t)
    LOOP
        dbms_output.put_line('Title : ' || i.title ||','||'Description :'||i.description);
    END LOOP;
END;

See you soon,.
Kadoch

Tags: Database

Similar Questions

  • How to extract an XML data that have different namespace prefixes?

    Hello

    I have inserted XMLs in an XMLTYPE column which are based on a common XSD that allows different namespaces.

    How can I extract some data from these XMLs using extractvalue when will be preceded different namespaces for this node?

    Thank you and best regards,
    A

    Hello

    You can use XPath:

    //*[local-name()="node_name"]
    

    For example:

    with t as (
     select xmltype(
     '
      mark
      del
     '
     ) doc
     from dual union all
     select xmltype(
     '
      john
      mum
     '
     )
     from dual
    )
    select extractvalue(t.doc,'//*[local-name()="name"]') as name,
           extractvalue(t.doc,'//*[local-name()="place"]') as place
    from t;
    

    or,

    with t as (
     select xmltype(
     '
      mark
      del
     '
     ) doc
     from dual union all
     select xmltype(
     '
      john
      mum
     '
     )
     from dual
    )
    select x.*
    from t, XMLTable(
    '
     {
      element name { //*[local-name()="name"] },
      element place { //*[local-name()="place"] }
     }
     '
    passing t.doc
    columns
     place varchar2(30) path 'place',
     name  varchar2(30) path 'name'
    ) x;
    
  • How to extract the party date XML dateTime data type

    Hi all

    I have a problem with the extraction of the date part of the dateTime data type. I am getting my output * 2012-09 - 28 T 21: 49:45 * in this format. I need to extract the date part which is

    * 2012-09-28 * excluding the time. Kindly help me out by doing this. I'm new to the world of xml. Sorry if this question seems to be too stupid, but I'm quite help less.

    Thank you

    What error do you get?

    These two work for me:

    let $myDateTime := xs:dateTime("2012-09-28T21:49:45")
    return {$myDateTime cast as xs:date}
    
    let $myDateTime := xs:dateTime("2012-09-28T21:49:45")
    return {xs:date($myDateTime)}
    
  • Extraction of XML data

    Hello

    I have a requirement to extract data from XML and insert in a custom table.

    XML structure is

    < A >

    < Column1 >

    < Column2 >

    < Column3 >

    < Column4 >

    < column > 5

    < A >

    < A1 >

    < Column1 >

    < Column2 >

    < Column3 >

    < Column4 >

    < column > 5

    < A1 >

    .

    .

    .

    .

    < a >

    < Column1 >

    < Column2 >

    < Column3 >

    < Column4 >

    < column > 5

    < a >


    I need to extract all the values in the column and insert it into a custom table.

    Number of nodes one will increase every day, and columns can be of the order of 50-100.


    With the help of EXTRACTVALUE and bulk collect I m doing this process, but taking almost 2 hours for the processing of 3000 records.


    Please let me know is there better way (in terms of performance) to extract XML data?


    Thank you

    Kumar.

    Why the node is called as A1, A2... One? Why can it not be Just A? Here's an example of how to represent XML report and analyzed data to a relational structure.

    SQL> with t
      2  as
      3  (
      4  select xmltype
      5         (
      6  '
      7      
      8           1
      9           ram
     10           01-01-2016
     11           10000
     12      
     13      
     14           2
     15           karthick
     16           01-01-2016
     17           10000
     18      
     19      
     20           3
     21           subha
     22           01-01-2016
     23           10000
     24      
     25      
     26           4
     27           vimal
     28           01-01-2016
     29           10000
     30      
     31      
     32           5
     33           vijay
     34           01-01-2016
     35           10000
     36      
     37  
    ' 38 ) xmldata 39 from dual 40 ) 41 select t1.* 42 from t 43 , xmltable 44 ( 45 '/table/row' passing xmldata 46 columns 47 empno number path 'empno', 48 ename varchar2(10) path 'ename', 49 doj varchar2(10) path 'doj', 50 sal number path 'sal' 51 ) t1; EMPNO ENAME DOJ SAL ---------- ---------- ---------- ---------- 1 ram 01-01-2016 10000 2 karthick 01-01-2016 10000 3 subha 01-01-2016 10000 4 vimal 01-01-2016 10000 5 vijay 01-01-2016 10000
  • Extraction of XML data and display new line

    I have a table named, SAPDATABROWSER, which has several columns and lines. A column named SAPTEXT (data type: CLOB) consist of xml data. Each XML data are different in terms of number of nodes, but has the same following structure:

    < SAP_BAPI_PROP >
    < SelectedProperty >
    < structure >
    < field > < / field >
    < length > < / length >
    < FieldValue > < / FieldValue >
    < type > < / Type >
    < priority > < / priority >
    < / structure >
    < / SelectedProperty >
    < / SAP_BAPI_PROP >

    So now, what I would do is, to extract the values: field, FieldValue and the length of each line (total 72) and see the result as follows.

    Length of track FieldValue
    XXXX YYYY ZZZZ
    PPPP QQQQ RRRR
    AAAA BBBB CCCC
    MMMM OOOO NNNN

    Again, each line (total 72) has several XML Data nodes, IE there are several nodes FieldType, length and field and no two XML data/line are similar!

    I use the following code:

    SELECT
    EXTRACT (xmltype (saptext), ' / SAP_BAPI_PROP/SelectedProperty/Structure/Field / text () ');
    EXTRACT (xmltype (saptext), ' / SAP_BAPI_PROP/SelectedProperty/Structure/Length / text () ');
    EXTRACT (xmltype (saptext), ' / SAP_BAPI_PROP/SelectedProperty/Structure/FieldValue / text () ')
    OF sapdatabrowser;

    The code above produces the following result:

    SAP_BAPI_PROP/.../Field/Text () SAP_BAPI_PROP/.../Length/text () SAP_BAPI_PROP/.../FieldValue/text)
    1 XXXXPPPPAAAA YYYYQQQQBBBB ZZZZRRRRCCCC
    2 MMMM OOOO NNNN


    Any suggestions? Thank you very much. :)

    Based on your sample data:

    SQL> select x.*
      2  from sapdatabrowser t
      3     , xmltable(
      4         '/SAP_BAPI_PROP/SelectedProperty/Structure'
      5         passing xmltype(t.saptext)
      6         columns field_name  varchar2(30) path 'Field'
      7               , field_len   varchar2(30) path 'Length'
      8               , field_val   varchar2(30) path 'FieldValue'
      9       ) x
     10  ;
    
    FIELD_NAME                     FIELD_LEN                      FIELD_VAL
    ------------------------------ ------------------------------ ------------------------------
    X                              Y                              Z
    P                              Q                              R
    A                              B                              C
    M                              N                              O
     
    

    (adjust the projected if necessary data types)

  • How can I embed XML data in a PDF file?

    I want to embed XML data in a PDF file if the file can be scanned for data behind the document. Is there a standard way to do this?

    For example, if the PDF file is a bank statement, the embedded XML would be his number and bank account balances. He would not understand the standard text in the statement such as the name of the Bank, etc.

    I read about the XMP specification, but this seems to be more than the document metadata (title, subject, etc.). And it contained are tagged but it's a different view of the entire document.

    ??? -Thanks - dave

    Although the XMP block are stored in XML format, you can just embed any XML file. The block must follow the standard, which means that each data packet must be defined in a schema - as the name suggests, XMP is extensible, you can set the new scheme for local use, but you can't mess with standard seals and add random new tags. The schema itself is not embedded in the file, it is referenced by a unique ID number and URI. of course have a lot of data in a custom schema does not mean that any software will see it - advanced search of Acrobat can be said to sweep the XMP block, but the search engines only tend to bother with tags such as "title" and "description".

    To see what is currently in a PDF file, open Document properties > Description > additional metadata > advanced.

    You can save the current XMP block in a text (.xmp extension) file and replace/add other files XMP. If you click on the 'i' icon in the upper right corner of the Advanced dialog box, you can access the system profiles - these can be created in other applications such as the bridge, but there is no Manager profile in Acrobat itself.

    For more technical information on the use of XMP and creating new schema, see http://www.adobe.com/devnet/xmp.html

    Note that the XMP SDK for CS6 does not work in the Acrobat family.

  • How to write the xml data to a file

    Hi all

    We have a requirement of writing, the xml data in a file in the data directory in the server. Generate xml data using the SQL below.

    SELECT XMLELEMENT ("LINE",
    XMLELEMENT ('CELL', xmlattributes (LIKE 'column name', ' EBIZCZMDL_01'), inventory_item_id).
    XMLELEMENT ('CELL', xmlattributes (AS 'Name of COLUMN', ' EBIZFFMT_01'), attribute29).
    XMLELEMENT ('CELL', xmlattributes ("COMMON" AS "Name of COLUMN"), inventory_item_id |) '' || attribute29 | "ITM")
    "XMLDATA" AS "PRODUCE")
    OF apps.mtl_system_items_b

    When we try to write this query data in a file using UTL_FILE.put_line, the script gives error
    PLS-00306: wrong number or types of arguments in the call to "PUT_LINE '.

    If anyone can help pls...

    Thanks in advance

    The call to dbms_xslprocessor.clob2file is in the cursor for the specific SQL loop.

    This is obviously the problem.
    The file is replaced with each iteration.

    Do not use a cursor at all.

    See the example below, it should be close to your needs:

    DECLARE
    
       l_file_name      VARCHAR2 (30);
       l_file_path      VARCHAR2 (200);
    
       l_xmldoc         CLOB;
    
    BEGIN
    
       l_file_path := '/usr/tmp';
       l_file_name := 'TEST_XREF4.xml';
    
       SELECT XMLElement("xref", xmlattributes('http://xmlns.oracle.com/xref' as "xmlns"),
                XMLElement("table",
                  XMLElement("columns",
                    XMLElement("column", xmlattributes('EBIZFFMT_01' as "name"))
                  , XMLElement("column", xmlattributes('COMMON' as "name"))
                  , XMLElement("column", xmlattributes('EBIZQOT_01' as "name"))
                  , XMLElement("column", xmlattributes('EBIZCZMDL_01' as "name"))
                  , XMLElement("column", xmlattributes('EBIZCZGOLD_01' as "name"))
                  ),
                  XMLElement("rows",
                    XMLAgg(
                      XMLElement("row",
                        XMLElement("cell", xmlattributes('EBIZCZMDL_01' AS "colName"), inventory_item_id)
                      , XMLElement("cell", xmlattributes('EBIZFFMT_01' AS "colName"), attribute29)
                      , XMLElement("cell", xmlattributes('COMMON' AS "colName"), inventory_item_id || '' || attribute29 || 'ITM')
                      )
                    )
                  )
                )
              ).getClobVal()
       INTO l_xmldoc
       FROM apps.mtl_system_items_b
       WHERE attribute29 IS NOT NULL
       ;
    
       dbms_xslprocessor.clob2file(l_xmldoc, l_file_path, l_file_name, nls_charset_id('UTF8'));
    
    END;
    /
    

    BTW, the directory in DBMS_XSLPROCESSOR parameter. CLOB2FILE must be an Oracle Directory object, not a literal path.

  • How the filter E4x Xml data in a tile list?

    Hello!

    I am trying to use a search box for some xml data that I have in a tile list. Can someone point me in the right direction?

    Here is the list of tile:

    < mx:HTTPService id = "GetXmlService".

    resultFormat = "e4x".

    Fault = "getXMLFault (Event); »

    result = "getXMLResult (Event); »

    showBusyCursor = "true" / >

    < mx:TileList id = 'tileList '.

    dataProvider = "{GetXmlService.lastResult.image}" "

    itemRenderer = "CustomItemRenderer."

    columnCount = "4".

    columnWidth = "125".

    number of lines = '2 '.

    rowHeight = '150 '.

    themeColor = "haloSilver".

    verticalScrollPolicy = "on".

    itemClick = "tileList_itemClick (event); "backgroundAlpha ="0"height ="487"borderStyle ="none"="30"right ="10"left ="10"/ >

    And here is the XML data:

    <? XML version = "1.0"? >

    < Gallery >

    < user name image = "People1' rating ="5"="yes"/ >

    < / Gallery >

    Hello

    protected function searchFunc(item:Object):Boolean

    {

    var username:String = .@username (XML topic);

    var insession: String = .@insession (XML topic);

    username = (username.substr(0,ti.text.length)) .toUpperCase ();

    var chkUser:String = (ti.text) .toUpperCase ();

    If (username == chkUser & insession.toUpperCase () == "YES")

    Returns true

    on the other

    Returns false;

    }

    I changed the variable names to make it a little clearer. Now whenever you perform a search it will only show according to Yes (Yes). You can have nested If more more complex application but remember there is always need to be a return to true or false for each record (item).
    David.
  • How to extract an XML attribute

    I need to extract the NetworkConnection network name (none) in the following XML:

    " < ns6:NetworkConnection network = 'none' needsCustomization = 'true' xmlns =" http://www.VMware.com/vCloud/versions "xmlns:ns2 =" http://schemas.dmtf.org/OVF/Envelope/1 "xmlns:ns3 =" http://schemas.dmtf.org/wbem/wscim/1/Common "xmlns:ns4 =" http://schemas.dmtf.org/wbem/wscim/1/CIM-Schema/2/CIM_VirtualSystemSettingData "xmlns:ns5 =" http://schemas.dmtf.org/wbem/wscim/1/CIM-Schema/2/CIM_ResourceAllocationSettingData "xmlns:ns6 =" http://www.VMware.com/vCloud/v1.5 "xmlns:ns7 =" http://www.VMware.com/Schema/OVF "xmlns:ns8 =" http://schemas.dmtf.org/OVF/Environment/1 "xmlns:ns9 =" http://www.VMware.com/vCloud/extension/v1.5 "> " "" "" ""

    < ns6:NetworkConnectionIndex > 0 < / ns6:NetworkConnectionIndex >

    < ns6:IsConnected > false < / ns6:IsConnected >

    < ns6:MACAddress > 00:50:56:3f:03:5 c < / ns6:MACAddress >

    < ns6:IpAddressAllocationMode > NONE < / ns6:IpAddressAllocationMode >

    < / ns6:NetworkConnection >

    I have:

    nsXML var = ns.toXml ();

    var doc = new XML (nsXML);
    default xml namespace = doc.namespace ();
    networkName var = doc.NetworkConnection.network;
    System.log (networkName);

    and am getting null

    I don't know how to refer to the attribute.

    You can try with

    doc.attribute("network")
    

    or

    doc.@network
    
  • How to remove an XML data model in data definition screen

    Hello

    Question: I downloaded the data definition file in the data model.
    How to remove it.

    What means each file type?
    XML Schema
    Data model
    Preview of a file
    Breaking control file

    I have an XML file and a XSL file. I need to have an output in XML format.

    So I installed my XML file in the data definition of data model.
    And the XSL file in the templates.

    Am I wrong?

    11.0.10.2

    Kind regards
    Sabine

    Question: I downloaded the data definition file in the data model.
    How to remove it.

    You can not remove it, but you can date deadline there.

    What means each file type?
    XML Schema
    Data model
    Preview of a file
    Breaking control file

    This is explained in the manual 'Oracle XML Publisher Administration and the Developer Guide Release 12' - http://docs.oracle.com/cd/B34956_01/current/acrobat/120xdoig.pdf

    I have an XML file and a XSL file. I need to have an output in XML format.

    So I installed my XML file in the data definition of data model.
    And the XSL file in the templates.

    Am I wrong?

    Good - See Chapter 2, "Creating the model" and Chapter 5 "models and chapter data ' in the same doc referenced above for more details.

    Thank you
    Hussein

  • How 2 get d xml data 2 devlp Orcl BI Business Publisher sql qry RPT

    I am new to Oracle BI Publisher Enterprise. To prepare a report of applications Oracle using BI Publisher allows us to obtain the simultaneous release of Oracle reports as XML (thru prg). Then, load the xml into the rtf document and define templt and data definition and rerun the GWP of conc... But in the company Oracle BI Publisher, how do we get the output xml from a sql query. Please bear with my ignorance and help me in this issue
    Thanks and greetings

    Create a new data source and make it as a sql query.
    And run the report, and then select the output in XML format.

    Save this XML and use it to RTF.

  • How to write the xml data to a file in pl/sql

    Hello

    DB version: 11.2.0.2.0

    Apps Version: 12.1.3

    We try to generate an xml file in a directory on the server through pl/sql program. Here is the code we use. But it gives an error like ' failed due to the ORA-01422: exact fetch returns more than number of lines. When we put the select statement in a cursor and try to write data one by one in the loop, it is written only one record. Please tell us if we make a mistake.

    -The code in error

    CREATE or REPLACE PROCEDURE TEST_XML_CREATE (errbuf OUT VARCHAR2

    ERRCODE OUT NUMBER)

    IS

    l_file_name VARCHAR2 (30);

    l_file_path VARCHAR2 (200);

    l_xmldoc CLOB.

    BEGIN

    l_file_path: = 'FTPPOST_OUT_GTI_AUDIT ';

    l_file_name: = 'TEST_XREF4.xml ';

    SELECT

    XMLElement ("financialorganization:LegalEntityList",

    xmlattributes ('http://schema.bppost1.be/entities/financial/financialorganization/v001' "xmlns:financialorganization", )

                       ' http://schema.bppost1.be/entities/base/BaseTypes/V001 ' 'xmlns:basetype',

                       ' http://www.w3.org/2001/XMLSchema-instance ' "xmlns: xsi"),

    XmlElement ("financialorganization:LegalEntity",

    XmlElement ("financialorganization:LegalEntityCode", fv.flex_value)

    XmlElement ("financialorganization:Description", fv.description)

    XmlElement ("basetype:ValidityPeriod",

    XmlElement ("basetype:OpenEndedPeriod",

    XmlElement ("basetype:StartDate", TO_CHAR(start_date_active,'YYYY-MM-DD')),

    XmlElement ("basetype:EndDate", TO_CHAR (end_date_active, 'YYYY-MM-DD'))

    )

    )

    )

    ). getClobVal()

    IN l_xmldoc

    Of

    fnd_flex_value_sets fvs,

    fnd_flex_values_vl fv

    WHERE 1 = 1

    -to be replaced by the name parameter value

    AND fvs.flex_value_set_name = 'iPROMIS_POST_GL_AFK01_ENTITEIT. '

    AND fvs.flex_value_set_id = fv.flex_value_set_id

    AND fv.summary_flag = 'n';

    dbms_xslprocessor.clob2file (l_xmldoc, l_file_path, l_file_name, nls_charset_id ('UTF8'));

    END;

    /

    The XML format we want to generate is less than

    ============================================

    < financialorganization:LegalEntityList

    ' xmlns:financialorganization = ' http://schema.bppost1.be/entities/financial/financialorganization/V001 "

    ' xmlns:basetype = ' http://schema.bppost1.be/entities/base/BaseTypes/V001 "

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

    < financialorganization:LegalEntity >

    < financialorganization:LegalEntityCode > 12345 < / financialorganization:LegalEntityCode >

    < financialorganization:Description > Test Description < / financialorganization:Description >

    < basetype:ValidityPeriod >

    < basetype:OpenEndedPeriod >

    < basetype:StartDate > 1900 - 01 - 01 < / basetype:StartDate >

    < / basetype:OpenEndedPeriod >

    < / basetype:ValidityPeriod >

    < / financialorganization:LegalEntity >

    < financialorganization:LegalEntity >

    < financialorganization:LegalEntityCode > 54321 < / financialorganization:LegalEntityCode >

    Test Description1 < financialorganization:Description > < / financialorganization:Description >

    < basetype:ValidityPeriod >

    < basetype:OpenEndedPeriod >

    < basetype:StartDate > 1900 - 01 - 01 < / basetype:StartDate >

    < / basetype:OpenEndedPeriod >

    < / basetype:ValidityPeriod >

    < / financialorganization:LegalEntity >

    < / financialorganization:LegalEntityList >

    Kind regards

    Pirre

    You must use the XMLAGG function to group LegalEntity items in a single fragment.

    Also use XMLSERIALIZE instead of the getClobVal method (it is not recommended).

    SELECT XMLSerialize(document
              XMLElement("financialorganization:LegalEntityList",
                xmlattributes('http://schema.bppost1.be/entities/financial/financialorganization/v001' "xmlns:financialorganization",
                             'http://schema.bppost1.be/entities/base/basetypes/v001' "xmlns:basetype",
                             'http://www.w3.org/2001/XMLSchema-instance' "xmlns:xsi"),
                XMLAgg(
                  xmlelement("financialorganization:LegalEntity",
                        xmlelement("financialorganization:LegalEntityCode", fv.flex_value),
                        xmlelement("financialorganization:Description", fv.description),
                        xmlelement("basetype:ValidityPeriod",
                            xmlelement("basetype:OpenEndedPeriod",
                                xmlelement("basetype:StartDate", TO_CHAR(start_date_active,'YYYY-MM-DD')),
                                xmlelement("basetype:EndDate", TO_CHAR(end_date_active, 'YYYY-MM-DD'))
                            )
                        )
                  )
                )
              )
           )
      INTO l_xmldoc
      FROM
        fnd_flex_value_sets fvs,
        fnd_flex_values_vl fv
    WHERE 1 = 1
        -- to be replaced by value set name parameter
       AND fvs.flex_value_set_name = 'iPROMIS_POST_GL_AFK01_ENTITEIT'
       and fvs.flex_value_set_id = fv.flex_value_set_id
       and fv.summary_flag = 'N';
    
  • How to extract the XML with namespace?

    Hi all

    Here's the XML I:

    <? XML version = "1.0" encoding = "UTF-8"? >
    -< transaction xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://schemas.test.com/Support/Services/test1/2012" xsi: schemaLocation = "http://schemas.test.com/Support/Services/test1/2012 Support.test1.v1.xsd" >
    -< application >
    < > 10 Sam < / Sam >
    < > 32 Actid < / Actid >
    < Pax > 3 < / Pax >
    < > 10 - DEC - 2012 Flt < / Flt >
    < user name > WebUserNameTest < / name >
    < / request >
    < application >
    < Sam > 1 < / Sam >
    < Actid > 3 < / Actid >
    < > 2 Pax < / Pax >
    < Flt > 2012 - dec - 12 < / Flt >
    < user name > WebUserNameTest < / name >
    < / request >
    < / transaction >

    I need to extract the item values:

    The code below will help me when I have no namespace, what needs to be done in order to work with the value of the element namespace and etract

    v_string_xml: =.
    ' / / Query [' |] To_char (counter_xml) | '] / Sam / text () ';
    v_ssp_table (v_ssp_table. COUNTY) .memid: =.
    p_xml_in. EXTRACT (v_string_xml) .getnumberval ();


    v_string_xml: =.
    ' / / Query [' |] To_char (counter_xml) | '] / Actid / text () ';
    v_ssp_table (v_ssp_table. COUNTY) .actid: =.
    p_xml_in. EXTRACT (v_string_xml) .getnumberval ();

    v_string_xml: =.
    ' / / Query [']
    || To_char (counter_xml)
    || '] / Pax / text () ';
    v_ssp_table (v_ssp_table..) Pax COUNT): =.
    p_xml_in. EXTRACT (v_string_xml) .getnumberval ();

    v_string_xml: =.
    ' / / Query [' |] To_char (counter_xml) | '] / Flt / text () ';
    v_ssp_table (v_ssp_table..) Flt COUNT): =.
    p_xml_in. EXTRACT (v_string_xml) .getstringval ();

    v_string_xml: =.
    ' / / Query [']
    || To_char (counter_xml)
    || '] / Username / text () ';
    v_ssp_table (v_ssp_table. COUNTY) .username: =.
    p_xml_in. EXTRACT (v_string_xml) .getstringval ();
    declare
      v_xml xmltype := xmltype( '
    
    
    10
    32
    3
    2012-DEC-10
    WebUserNameTest
    
    
    1
    3
    2
    2012-DEC-12
    WebUserNameTest
    
    ' );
    begin
      for r_xml in ( select *
                     from xmltable( xmlnamespaces( default 'http://schemas.test.com/Support/Services/test1/2012' )
                                   , '/Transaction/Request'
                                   passing v_xml
                                     columns memid number path 'Memid'
                                           , actid number path 'Actid'
                                           , pax number path 'Pax'
                                           , flt varchar2(100) path 'Flt'
                                           , username varchar2(100) path 'Username'
                                  )
                   )
      loop
        dbms_output.put_line( r_xml.memid );
        dbms_output.put_line( r_xml.actid );
        dbms_output.put_line( r_xml.pax );
        dbms_output.put_line( r_xml.flt );
        dbms_output.put_line( r_xml.username );
      end loop;
    end;
    
  • How to '&amp;' in the xml data sent to LiveCycle

    I create a xml in Flex object and send it to LiveCycle to fill a PDF file that the user can print or save.

    The problem is the user can enter a '&' in the context of their notes and a drop-down list boxes which has in it as well.

    Worst case I loop through the entry and change any 'and' is not '& amp;' to ' & amp; '  But I hope for a more elegant method.

    Any ideas?

    Here is an example you can try to use a regular expression with the method replace:

    private var s:String = 'All cela & more & more.';
             
             
    private function cleanString (): void {}
    var model: RegExp = / &/g;
    s = SS. Replace (pattern, '&');
    trace();
    }

    Looks like you want to clean your data strings of anything that could be used to hack into your database. Look in "sql injection attacks" on the web to find the characters that can be used to enter your database. Then clean your strings before sending it to the db. Regarding the backbone goes, you should always validate data there also before using it in SQL statements, just to be sure (there are tools that can be used to modify your own data Nice before sending it to the back-end).

    In addition, there a lot of web sites that can help you build complex regular Expressions to validate data in one shot.

    For example, here's one that I use on telephone numbers submitted by a user:

    model = / [-\-\.\s\D (\)] / g; includes brackets, dashes, periods, spaces, and nonnumeric characters. global flag is used.

    Str = str.replace (model, "")

    ); delete them all in a single pass by replacing with a string of length zero.

    The trainers standard can also be used to limit/control which users can/cannot enter, so be sure to look at those.

  • How to extract data using bluetooth other device...

    Hi all

    First, I describe my problem:

    I want an application that extract the xml data in ECG device using bluetooth after accessing this data make some calculation and send it to the server... I am able to serach all the device compatible bluetooth after that, I am also able to connect from the particular device... (Now I use bluetooth Simple device as phone, pc or anything which is Bluetooth)

    Now the problem is... After connection of the device, I want to go get a (for example an image or text document.) file of the device connected using my camera...

    can anyone know how to extract data or file to another device that is currently associated with my camera... using BlackBerry device...

    Please help me to overcome this problem...

    Currently, I am working with Blackberry.6

    As suggested, I would recommend you try the samples provided.

Maybe you are looking for

  • Satellite M100 PSMADL - what drivers do I need?

    I bought a Satellite M100 18 months in Singapore.I would like to update its drivers & BIOS etc but I can't identify with certainty at 100% which model I have exactly.The part number on the underside of the laptop reads as follows: PSMADL - 00G 005 Ca

  • HP pavilion dv2000 entertainment pc media center laptop RAM Upgrage

    I am now ready to update my RAM of 1 gb (2x512mb) provided in the initial configuration of 2.5 GB (1x2Go + 1x512mo). Provided in the existing RAM clock speed is 667 MHz and 2 GB of RAM I'm willing to be upgraded with the frequency of 800 MHz. Will th

  • photos of finding deleted on the computer

    I had deleted all the pictures on the computer, cause, they were old. And after awhile, they got emptied from the Recycle Bin. Is any way to recover?

  • WindowsUpdate_0000057E

    WindowsUpdate_0000057E is security update for Microsoft PowerPoint 2007 (KB957789) of the patches for this error. Please, I beg you.  YOU

  • LaserJet Pro M1212nf MFP: There is no installed TWAIN compatible device.

    Since the upgrade to Windows 10, my scanning function produces the error message in the subject line.  The printer was working after the upgrade I don't analyze that often, so I did not immediately notice. The system now lists a "other device" called