Selectively showing a subform, according to xml data.

Hi, I am using subforms of choice for several weeks, so far, they have worked like a charm.

Now, I have to show subforms (or not), using an approach of the difference, according to the following (new to me) criteria:

I got this XML:

< root >

< account >

< productType > 1 < / productType >

< productName > record account < / productName >

< > 111111 currentBalance < / currentBalance >

< availableBalance > 111222 < / availableBalance >

< savingAccountField1 > economy account field 1 < / savingAccountField1 >

< / account >

< account >

< productType > 2 < / productType >

< productName > ready < / productName >

< > 222222 currentBalance < / currentBalance >

< availableBalance > 222333 < / availableBalance >

field of loan < loanField1 > 1 < / loanField1 >

field of loan < loanField2 > 2 < / loanCorrienteField2 >

< / account >

< / root >

(Sorry I don't know how to get in shape in this forum)

I had also 2 subforms, with fields and properties that belong to a saving account and other fields and properties that belong to the type of loan accounts, two subforms are inside a set of choices on the subform.

Now, how can the tricky part, I selectively show:

-two subforms so I have types of goods 1 and 2 (first tag in the node of xml account)

-one or the other if I produced only one type (1 or 2)

- or if I don't have these types of product present in the xml file.

-multiple instances of subforms if I have more than one type of the same type of product.

I hope I expressed me and the problem I have correctly.

Thank you!.

(1) select your SubformSet and choose Edit alternatives... in your object palette

(2) you should see your two subforms in the editing window. Use .account $ for two bindings (assuming that your root subform is named 'root'.

(3) for the (JavaScript) Expression, use the script: productType.value == '1' one and productType.value == '2' to another according to the subform that you want to display.

(4) closed that edit window by clicking OK, and go to the tab link make sure repeat subform defined for each data item is selected.

That should do it!

Kyle

Tags: Adobe LiveCycle

Similar Questions

  • Select the XML data

    Dear all,

    Please find a list of the steps done to read the date of conversion of currency by the last final query, that I can be able to obtain the release of the name of the Bank as the Central Bank, but impossible to extract the time, rates, currency of the XML data.

    Please tell us how to solve the problem.

    CREATE TABLE url_tab

    (

    URL_NAME VARCHAR2 (100),

    SYS URL. URIType

    );

    INSERT INTO url_tab VALUES

    ("This is a test URL',

    sys . UriFactory.getUri ("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" "")

    );

    INSERT into xml_data_tab select sys.xmltype.createXML (u.url.getClob ()) in u url_tab;

    Select Bank_name, xt1.* from

    XMLTable (XMLNamespaces (default 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref', ))

                                   ' ( http://www.GESMES.org/XML/2002-08-01 ' as "gesmes"),

    ' / / gesmes:Envelope'

    FROM (select * from xml_data_tab)

    columns

    Path of varchar2 (100) Bank_name ' / gesmes:Envelope / gesmes:Sender / gesmes:name',

    outer join left perv_t XMLTYPE PATH "Cube/Cube")

    XMLTable (XMLNamespaces ('http://www.gesmes.org/xml/2002-08-01' as "gesmes"), )

    "/ / Cube/Cube."

    FROM (select * from xml_data_tab)

    COLUMNS

    path of varchar2 (100) of rate_date "@time"

    path varchar2 (100) coin "@currency."

    path of rate varchar2 (100) '@rate') xt1 on 1 = 1

    its work for me

    SQL > with xml_data_tab like)

    2. Select XMLType)

    3'http://www.gesmes.org/xml/2002-08-01' xmlns ="http://www.ecb.int/vocabulary/2002-08-01/eurofxref" >. "

    4 reference rate

    5

    6 the European Central Bank

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    24

    25

    26

    27

    28

    29

    30

    31

    32

    33

    34

    35

    36

    37

    38

    39

    40

    41

    42

    43 ') as the double DATA

    44)

    45 select Bank_name, xt1. RATE_DATE, xt2.*

    XMLTable 46 (XMLNamespaces (default 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref',

    47'http://www.gesmes.org/xml/2002-08-01"as"gesmes"),"

    48 ' / / gesmes:Envelope'

    49 FROM (select * from xml_data_tab)

    50 columns

    51 way of varchar2 (100) of Bank_name ' / gesmes:Envelope / gesmes:Sender / gesmes:name',

    52 perv_t XMLTYPE PATH 'Cube'):

    53 left outer join XMLTable (XMLNamespaces (default 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'),

    54                         '*'

    55 in PASSING (h.perv_t)

    56 COLUMNS

    path of varchar2 (100) 57 rate_date "Cube/@time."

    58 rate_data XMLType path ' / / Cube/Cube ') xt1 on 1 = 1

    59 left outer join XMLTable (XMLNamespaces (default 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'),

    60 ' / / cube/Cube/Cube. "

    61 FROM (select * from xml_data_tab)

    62 COLUMNS

    path of VARCHAR2 (3) currency 63 "@currency."

    number 64 path "@rate" rate) xt2 on 1 = 1;

    BANK_NAME RATE_DATE HEART RATE

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

    2015 Central Bank European-12-30 US $ 1.0926

    30-12-2015 of the European Central Bank JPY 131.66

    2015 Central Bank European-12-30 BGN 1.9558

    2015 Central Bank European-12-30 CZK 27.029

    30-12-2015 of the European Central Bank DKK 7.4625

    2015 Central Bank European-12-30 GBP.73799

    30-12-2015 of the European Central Bank HUF 313,15

    2015 Central Bank European-12-30 PLN 4.24

    30-12-2015 of the European Central Bank, RON 4.5296

    2015 Central Bank European-12-30 SEK 9.1878

    2015 Central Bank European-12-30 CHF 1.0814

    BANK_NAME RATE_DATE HEART RATE

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

    2015 Central Bank European-12-30 NOK 9.616

    30-12-2015 of the European Central Bank 7.637 HRK

    30-12-2015 of the European Central Bank RUB 79.754

    30-12-2015 of the European Central Bank TRY 3.1837

    2015 Central Bank European-12-30 AUD 1.499

    30-12-2015 of the European Central Bank BRL 4.259

    2015 Central Bank European-12-30 CAD 1.5171

    2015 Central Bank European-12-30 CNY 7.091

    2015 Central Bank European-12-30 HKD 8.4685

    30-12-2015 of the European Central Bank IDR 15081.33

    30-12-2015 of the European Central Bank, ILS 4.2606

    BANK_NAME RATE_DATE HEART RATE

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

    30-12-2015 of the European Central Bank INR 72.535

    30-12-2015 of the European Central Bank 1284.79 KRW

    2015 Central Bank European-12-30. 18.8867 MXN

    30-12-2015 of the European Central Bank MYR 4.6887

    2015 Central Bank European-12-30 NZD 1.5959

    30-12-2015 of the European Central Bank PHP 51.281

    30-12-2015 of the European Central Bank SGD 1.5449

    2015 Central Bank European-12-30 THB 39.334

    30-12-2015 of the European Central Bank ZAR 16.8847

    31 selected lines.

  • Hide/show several subforms based on drop-down list selection

    Hi - I'm wanting to use a selection from a drop-down list for hide/show 17 subforms which contain only text. I tried if/else instructions that I used in the same way before but I have problems of implementation of that time. Is there a better way to do when several subforms are required to show/hide. Thank you.

    What event trigger you the action on? I have the following to the Exit event and it works.

    If (this.rawValue == "Hide") {}

    subForm1.presence = "hidden".

    }

    on the other

    If (this.rawValue == "Post") {}

    subForm1.presence = "visible".

    }

    If however you have the button 'Specify Item values' clicked on the link tab, you need to change the "Hide" values for their specified either value "1".

    You have changed the code to:

    If (this.rawValue == "2") {}

    subForm1.presence = "hidden".

    }

    on the other

    If (this.rawValue == "1") {}

    subForm1.presence = "visible".

    }

  • Select this OPTION to generate XML data from the table using XMLELEMENT, XMLAGG gives error ORA-19011 string buffer too small

    My select statement fails with the error:


    The ORA-19011 string buffer too small


    The select statement looks like:


    SELECT TO_CLOB)

    XMLELEMENT ("accounts",

    XMLELEMENT ("count",

    XMLATTRIBUTES)

    rownum AS "recordId."

    To_date('20130520','YYYYMMDD') AS "datestarted."

    123456 AS "previousBatchId."

    56789 AS 'previousRecordId '.

    ),

    ....

    .... .

    .....

    XMLFOREST)

    SIG_ROLE AS "SignatoryRole."

    To_char(TRANSFER_DATE,'YYYY-mm-DD') AS "TransferDate."

    NVL(Reason,0) AS 'reason '.

    ) AS the 'transfer '.

    )

    ()) AS CRDTRPT

    OF ANY_TABLE;

    • It looks like I can choose only 4000 characters using the SELECT statement (please, correct me if I'm wrong)

    I'd use the XMLGEN package. But the environment team says no mounted drives in the future with the arrival of the EXADATA.

    NO HARD DRIVE MOUNTED, NO ACCESS TO THE DATABASE DIRECTORIES

    No UTL_FILE

    I need to use the REEL spool the resulting XML data of the SELECT query.

    SQL is a standard in my org, but I can do with a PL/SQL solution also to load data into a table (cannot use a COIL with PL/SQL)

    What I do is:

    1. a column of type CLOB to a xml_report of the loading of the above SELECT query table
    2. Then using SELECT * FROM xml_report to SPOOL the data to a file report.xml

    No need of XMLTYPE data behind. Xml data stream is fine for me.

    In addition, I need to validate the XML file, also using XSD.

    Problem is that the resulting lines of the select query are supposed to be from 15000 to 20000 bytes long.

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

    A Suggestion or a solution to this problem would be appreciated.

    (Sorry for the use of "BOLD", just to make it more readable and highlight the imp points)

    Bravo!

    Rahul

    It looks like I can choose only 4000 characters using the SELECT statement (please, correct me if I'm wrong)

    You use the right method.

    There is an implicit conversion from XMLType to the data type VARCHAR2 as expected by the function TO_CLOB, where the limitation, and the error.

    To serialize XMLType to CLOB, use the XMLSerialize function:

    SELECT XMLSerialize (DOCUMENT

    XMLELEMENT ("accounts",

    ...

    )

    )

    OF ANY_TABLE;

    For the rest of the requirement, I wish you good luck trying to spool the XML correctly.

    You may need to play around with the SET LONG and SET LONGCHUNKSIZE commands to operate.

  • Charger xml with sql loader in an xmltype table and show that contain it this XML table

    Hello

    I have a xml document and I want to load in an xmltype table.

    create table foo as xmltype;


    the control file is:


    LOAD DATA
    INFILE
    *
    INTO TABLE foo
    TRUNCATE
    XMLType(XMLDATA)(
    lobfn FILLER CHAR TERMINATED BY
    ',',
    XMLDATA LOBFILE
    (lobfn) TERMINATED BY EOF
    )
    BEGINDATA
    C
    :\Users\xxx\Desktop\file.xml


    now, I want to show the content of the xml file that is loaded at the time of table. How do you?


    select * from foo;   ??


    but this does not show the content of this xml file, but only total, this xml code.



    Thank you

    Hello

    Try to take a look at the Oracle XML SQL functions:

    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28369/xdb04cre.htm

  • The value of XML data

    Hi all

    I am Oracle 11 g

    I have XML data as below

    < lines >

    < line-diff op = 'delete' line-stat = "oos" >

    < host rank = "targ" >

    < name of col = 'GUID' val = "7932504" / >

    < name of col = 'SCRTY_ROLE_ID' val = '1' / >

    < name of col = hex "GGROWHASH" = "o" val = 'ffffffffffffffff' / >

    < / row >

    < / line-diff >

    < line-diff op = 'delete' line-stat = "oos" >

    < host rank = "targ" >

    < name of col = 'GUID' val = "7933046" / >

    < name of col = 'SCRTY_ROLE_ID' val = '1' / >

    < name of col = hex "GGROWHASH" = "o" val = 'ffffffffffffffff' / >

    < / row >

    < / rows >

    Need to extract value and show as below

    OPERATION GUID SCRTY_ROLE_ID

    Remove 7932504 1

    Remove 7933046 1

    Please help on this.

    Appreciate your help.

    Thank you

    We can somewhat simplify the XQuery for @Gaz in Oz:

    WITH data(text) AS
    (SELECT
            '
                
                   
                      
                      
                      
                   
                
                
                   
                      
                      
                      
                   
                
                
                   
                      
                      
                      
                   
                
         '
    FROM dual
    )
    SELECT r.*
       FROM data x,
            XMLTABLE('rows/row-diff'
                    PASSING XMLTYPE(x.text)
                    COLUMNS operation     VARCHAR2(12) PATH '@op',
                            guid          NUMBER       PATH 'row/col[@name="GUID"]/@val',
                            scrty_role_id NUMBER       PATH 'row/col[@name="SCRTY_ROLE_ID"]/@val'
                   ) r
    ;
    
    OPERATION GUID SCRTY_ROLE_ID

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

    delete 7932504 1
    delete 7933046 1
    Update 7933999 1

    3 selected lines.

  • Combining XML data from a LiveCycle form in original form

    Hello

    I found a lot of questions on the subject but very few answers...

    I create a new form in the designer (Dynamics and grows to the size, etc.) who died and has now been returned (about 15 or 20 copies). Some chose to return the PDF saved for me since I had extended rights of use to the reader, another sent the XML data. I have compiled the form returned (in Adobe Pro 9) and everything looks good, but now I also want to be able to view all THE answers to a given domain in the original shape/model (or at least together in a cell/field any). In the upper part, I can select a line (this is a suite of XML from a returned form data) and Adobe provides information the original model (shown in the lower pane) with all selected form data, but when I select several lines, the data that a single line appears in the form.

    Say a field named "Objective_1_2", I now have 15 answers with multiple lines of text in this field and return in the model of origin (or in any other way), I want to see THE answers of "Objective_1_2" together in a single field.

    The result I'm after is to be able to show everything at once without the manual work of reorganization and restructuring of the exported spreadsheet (as seems to be the case at the moment).

    Is it possible (keeping in mind that I don't have the option to use the server software for all merge...).

    Thanks a lot, a lot.

    Cory

    This is because each line gets a unique name... so from the perspective of tables each is different.

    Paul

  • 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.
  • Dynamic form: XML Data Import Question (I'm almost there..)

    Niall was very useful gettig me at this point.  Thank you very much!

    I did all my updates and changes that have been suggested in the following form:

    https://Acrobat.com/#d=t1uvlNlj4Yrh7zxtpbJiRg

    My question is, when I import the XML data file, only a few of the shows of information upward?

    Thought of back in all it took to get to this day, I don't know if I should not be only to count my blessings to be where I am?  But, if someone (and knowing Niall is probably reading this - but I was too embarrassed to ask for more help), could help to tell me what I should do, I think it will be the last time I have to ask for help... at least on this form.


    Thank you!!!

    Hi Rob,

    In this case you don't need a data connection.

    If you select a field and go to object > link tab, you will see a drop-down list to specify the data binding for this field. Currently it is set to 'None', which means that the field data will not be exported. Similarly, if you had an XML file with data, it would not be imported into the field.

    Here is a screenshot of LC Designer ES2, which is slightly different for earlier versions, but the basic process is the same.

    Go through each field and change 'No data binding' / 'None' to 'Use the name' / 'Normal '.

    Then when you are proposing and import, data populates the fields.

    Hope that helps,

    Niall

  • When I open the Task Manager and select "Show processes from all users" there are 2 files virus csrss.exe?

    original title: virus csrss.exe?

    I use Vista Home Premium.  When I open the Task Manager and select "Show processes from all users" there are 2 files csrss.exe.  I learned that this indicates that I was infected by a virus.  Is this the case?

    Hi Julie,.

    Did you the latest changes on the system?

    Csrss.exe is Client/Server Runtime Subsystem.  All the Microsoft system has file csrss.exe running in the Task Manager, but it is likely to be infected by others. If it uses a lot of time processor and extremely abnormal in activities in the Task Manager, you can run a scan of the system security.

    You can read the following article to download the Microsoft Safety Scanner and perform a full scan on your computer.

    Microsoft safety scanner

    Note: When you perform the analysis, there are chances of losing the data that you can take a backup of important data before performing analysis.

    Hope this information is useful.

  • WebView URL of XML data

    Hello

    I created a Listview and ListItemComponents .xml file

    I would like to open a WebView with the url selected in the .xml file, when a user clicks on an element.

    That's what I have so far:

    hand. QML

    import bb.cascades 1.0
    
    TabbedPane {
        showTabsOnActionBar: false
        Tab {
            title: "Home"
            imageSource: "asset:///images/custom/icon_197.png"
            Page {
                id: homepage
    
                titleBar: TitleBar {
                        title : "Title"
                    }
                    content: Container {
                        // Create a ListView that uses an XML data model
    
                        ListView {
                            dataModel: XmlDataModel {
                                source: "models/home.xml"
                            }
    
                            listItemComponents: [
    
                                ListItemComponent {
    
                                    type: "header"
    
                                    // Use a predefined Header to represent "header"
                                    // items
                                    Header {
                                        title: ListItemData.title
                                        subtitle: ListItemData.subtitle
                                    }
                                },
                                ListItemComponent {
                                    type: "listItem"
    
                                    // Use a predefined StandardListItem to represent "listItem"
                                    // items
                                    StandardListItem {
                                        title: ListItemData.title
                                        description: ListItemData.subtitle
                                        status: ListItemData.status
                                        imageSource: ListItemData.image
    
                                    }
    
                                } // end of second ListItemComponent
    
                            ]
                                            onTriggered: {
                                                var chosenItem = dataModel.data(indexPath);
    
                                                // Create the content page and push it on top to drill down to it.
                                                var page = webviewID.createObject();
    
                                                // Set the title and source of the feed that the user selected.
                                                page.weburl = ListItemData.weburl
                                                page.title = chosenItem.title
    
                                                nav.push(page);
                                            }
                             // end of listItemComponents list
                        } // end of ListView
                    } // end of Container
    
                actions: [
                    ActionItem {
                        title: "About"
                        imageSource: "asset:///images/custom/bb10/ic_info.png"
                    },
                    ActionItem {
                        title: "Settings"
                    }
                ]
    
            }
    
                 attachedObjects: [
                      ComponentDefinition {
                          id: webviewID
                          source: "webview.qml"
                      }
                  ]
    
        }
        Tab {
            title: "Options"
            Page {
                id: page2
                actions: [
                    ActionItem {
                        title: "Edit"
                    },
                    ActionItem {
                        title: "Save"
                    }
                ]
            }
        }
        Tab {
            title: "Help"
            Page {
                id: page3
                actions: [
                    ActionItem {
                        title: "Search"
                    },
                    ActionItem {
                        title: "Browse"
                    }
                ]
            }
        }
    
    }
    

    WebView.QML

    import bb.cascades 1.0
    
    Page {
        property alias title: titleBar.title
        property variant chosenItem
        property alias html: ListItemData.html
        property variant weburl
        titleBar: TitleBar {
            id: titleBar
        }
        WebView {
            id: webView
    
        }
    }
    

    Home.Xml

    
        http://www.google.nl"/>
        http://crackberry.com"/>
    
    

    Help, please!

    Thanks in advance, Jeroen

    The fixed.

    More info and code: http://forums.crackberry.com/bb-10-developers-hangout-f276/webview-url-xml-data-808285/

  • 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
  • extract data from blob field containing xml data big

    I'm working on Oracle 11 g 2, 11.0.2.0.3. UNIX database server.

    my oracle instance receive large xml data service web ftp, I put this file as blob in a table called TBL_ALERT_XML (ID_ALERT NUMBER, DATE of the TIMESTAMP_ALERT, ALERT_XML BLOB).

    My goal is to get data of BLOB content e file put in one or more other tables.

    I try with the opening of a cursor on

    SELECT XMLTYPE (UTL_RAW.cast_to_varchar2 (ALERT_XML)). Extract (' alerts/points/point / / Text () ') threads

    OF TBL_ALERT_XML

    without any filter on ID_ALERT.

    But I get the error:

    ORA-22835: buffer too small for to CHAR CLOB or BLOB to RAW conversion



    Please help me, thank you very much

    Because the web service is deployed in python and my co worker is not able to call a stored procedure with the parameter xmltype, but only with the setting of the BLOB.

    If you can't get around it, so be it. All the less, using CLOB would be better.

    However, which prevents you to convert BLOB XMLType entry within the stored procedure and store it in an XMLType column.

    To do this, simply use the XMLType of BLOB.

    create table tbl_alert_xml)

    number of id_alert

    date of timestamp_alert

    alert_xml xmltype

    );

    insert into tbl_alert_xml

    values)

    1

    sysdate

    xmltype (p_blob

    , nls_charset_id ('AL32UTF8') - put the encoding of the file here

    )

    );

    Then, you will be able to execute queries optimized using XMLTABLE.

  • Extract XML data using XML table NULL recovery

    Hello

    I use XMLtable to recover data using XMLtable

    XML

    "< env:Envelope xmlns:env = ' http://schemas.xmlsoap.org/SOAP/envelope/ ">

    < env:Header > < / env:Header >

    < env:Body >

    " < = Xmlns:ns1 CreditBureauResponse ' http://www.example.org "xmlns =" " http://www.example.org ">

    < ns1:Body >

    < ns1:MGResponse > & lt; MGResponse xmlns = "urn: crif - messagegateway:2006 - 08-23" > & lt; U2:AUE_RES xmlns:u2 = "urn: AUE" > & lt; U2:response > & lt; U2:CBApplicationId > 123456789 & lt; / u2:CBApplicationId > & lt; U2:ProviderApplicationNo > 123 & lt; / u2:ProviderApplicationNo > & lt; U2:PreviousPhase > D & lt; / u2:PreviousPhase > & lt; U2:ActualPhase > D & lt; / u2: ActualPhase > & lt; U2:ApplicationDeleted > 0 & lt; / u2:ApplicationDeleted > & lt; / u2:Response > & lt; / u2:AUE_RES > & lt; / MGResponse > < / ns1:MGResponse >

    < / ns1:Body >

    < / CreditBureauResponse >

    < / env:Body >

    "< / env:Envelope >.

    I would like to know where I am going wrong

    SELECT x1.*

    OF tmp_xml_aue t.

    XMLTABLE (XMLNAMESPACES ('http://schemas.xmlsoap.org/soap/envelope/"as"env","http://www.example.org"as 'ns1", default'http://www.example.org'), )

    ' / env:Envelope / env:Body / CreditBureauResponse' T.OBJECT_VALUE by the WAY

    columns MGRESPONSE xmltype PATH "ns1:Body/ns1:MGResponse/text()") X 1,

    XMLTABLE (XMLNAMESPACES ("urn: crif - messagegateway:2006 - 08-23' as"v1", default" urn: AUE' '), ' / MGResponse/AUE_RES ' PASSAGE xmltype (DBMS_XMLGEN.convert (X 1.) MGRESPONSE. GETCLOBVAL(), 1))

    columns CBAPPLICATIONID varchar2 (15) WAY "response/CBApplicationId.

    ) X 2;

    Hello

    I saw your question and I hope that the link below will help you solve your solution:

    https://Oracle-base.com/articles/Misc/XMLTable-query-XML-data-from-SQL

    If there are problems more made me know I'll like you the exact solution for your query.

    Kind regards

    Vinoth.

  • Update of a column of table from xml data

    Hello

    I have an obligation to update a particular table from xml data column. to do this, I wrote the code below but I am not able to insert. could you please a peek into that.

    create table emp3
    as
    select *From emp
    where 1=1;
    
    alter table emp3
    add (fax_response varchar2(50));
    
    /*create sequence EmailRecords_XMLFILE_SEQ
      minvalue 1
      maxvalue 999999999999999999999999999
      start with 1
      increment by 1
      nocache;*/
    
    /* create global temporary table EmailRecords_XMLFILE
      (
      ID NUMBER not null,
      xmlfile CLOB
      )
      on commit preserve rows;*/
    
    /* create global temporary table UPD_Email_Records_With_Xml
      (
      id NUMBER not null,
    
      response VARCHAR2(500)
    
      )
      on commit preserve rows; */
    
    
    

    the XML data is

    <FAX>
    <EMAILOG>
    <ID>7839</ID>
    <RESPONSE>FAX SENT</RESPONSE>
    </EMAILOG>
    <EMAILOG>
    <ID>7566</ID>
    <RESPONSE>FAX NOT SENT</RESPONSE>
    </EMAILOG>
    </FAX>
    
    
    

    CREATE OR REPLACE PROCEDURE proc_upd_email_records (
       loc_xml          IN       CLOB,
       p_err_code_out   OUT      NUMBER,
       p_err_mesg_out   OUT      VARCHAR2
    )
    IS
       loc_id   NUMBER;
    BEGIN
       loc_id := emailrecords_xmlfile_seq.NEXTVAL; --created sequence
    
    
    
       INSERT INTO emailrecords_xmlfile --created Global Temp table
                   (ID, xmlfile
                   )
            VALUES (loc_id, loc_xml
                   );
    
       COMMIT;
          insert into UPD_Email_Records_With_Xml --created Global Temp table
            (ID, RESPONSE)
            select x1.id,
    
                      x1.RESPONSE
              from EmailRecords_XMLFILE,
                   xmltable('/FAX/EMAILOGID' passing
                            xmltype.createxml(EmailRecords_XMLFILE.xmlfile)
                            columns header_no for ordinality,
                            id number path 'ID',
                            RESPONSE VARCHAR2(250) path 'RESPONSE'
    
                               ) x1
             where EmailRecords_XMLFILE.id = loc_id;
       COMMIT;
    
       UPDATE emp3 er
          SET er.fax_response = (SELECT response
                               FROM upd_email_records_with_xml pr
                              WHERE pr.ID = er.empno)
        WHERE er.empno IN (SELECT ID
                             FROM upd_email_records_with_xml);
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          raise_application_error
             (-20000,
              'Sorry ! The Xml File which is passed is empty. Please try with Valid Xml File. Thank you!!! '
             );
       WHEN OTHERS
       THEN
          p_err_code_out := 4;
          p_err_mesg_out := 'error in insertion=> ' || SQLERRM;
    END proc_upd_email_records;
    {code}{code}
    
    
    

    Someone suggest me a slightly easier way to insert data...

    Thank you...

    You're complicating things

    A simple MERGE statement will do.

    create or replace procedure (proc_upd_email_records)

    loc_xml in clob

    )

    is

    Start

    merge into e emp3

    a_l'_aide_de)

    Select id

    response

    from xmltable)

    "/ FAX/EMAILOG.

    by the way xmlparse (document loc_xml)

    the columns id number way "ID".

    , path of varchar2 (250) response 'RESPONSE '.

    )

    ) v

    on (e.empno = v.id)

    When matched then update

    Set e.fax_response = v.response

    ;

    end;

    /

    But there is no value added by using these temporary tables if you are not at least an intermediate XMLType column (storage preferably binary XML).

    -What is the input XML code?

    -What is the version of db?

Maybe you are looking for

  • iPhone 6 more docent gives access photos app

    so, my iphone 6 more docent let apps access pictures (the only exception is instagram) and he told me to give permission. When I give permission there's no option that says photos to turn on. can someone help me? I tried to reinstall some of them, bu

  • How can I stop the bad website to come whenever I start Firefox?

    After installing some software, the URL "http://hi.ru/?10" guard opening in a new tab, whenever I run Firefox. He also took over my home page in Chrome and IE, but it was easy to fix those. For some reason, he keeps ignoring the homepage that I chang

  • Journal of the digitizer

    I need to connect the two channels of my digitizer for 8 seconds. I need to see how 2 waveforms (both 350kHz) change hours additional sampling rate should be as high as possible. Nothing complicated to do. No trigger. No timetable. No special file ty

  • need to adjust the paper after each print

    I have that 7520 printer all in one for 2 months (new) After each impression I have to adjust the paper otherwise, I get the message: no paper

  • Set up a printer on a network

    In my network, there are about 75 computers and 7 printers. 5 printers are shared so you can search when adding a printer and they appear. The other 2 are color printers only we have and that you are connected to the computer of managers. I have full