Parsing xml and store the details in the hierarchical tables

Hi all

I'm trying to parse a xml code and store the details in the hierarchical tables, however, I am unable to analyze the child attributes of tags and store the details in relational format.

Oracle - 11.2.0.4 version

My XML looks like in below:

<Root>
<ParentTag name="JobName" attrib1="Text" attrib2="SomeOtherText">
  <ChildTag childAttrib1="SomeValue1" childAttrib2="SomeValue2" />
  <ChildTag childAttrib1="SomeValue3" childAttrib2="SomeValue4" />
  <ChildTag childAttrib1="SomeValue5" childAttrib2="SomeValue6" />

  <OtherChildTag childAttrib1="SomeValue1" childAttrib2="SomeValue2" />
</ParentTag>
</Root>

The table structure is as follows:

create the table parent_details
(
job_id number primary key,
VARCHAR2 (100) job_name,.
job_attrib1 varchar2 (100),
job_attrib2 varchar2 (100)
);

create the table child_details
(
child_id number primary key,
number of parent_job_id
child_attrib1 varchar2 (100),
child_attrib2 varchar2 (100),
Constraint fk_child_details foreign key (parent_job_id) refers to parent_details (job_id)
);

After analysis, I would expect the data to be stored in the format below:

Table Name:-
parent_details
ID Name     Attribute1  Attribute2
1  JobName  Text        SomeOtherText


ChildTable (Store Child Tag details)
ID Parent ID Attribute1  Attribute2
1  1         SomeValue1  SomeValue2
2  1         SomeValue3  SomeValue4
3  1         SomeValue5  SomeValue6

I tried following SQL, but it does not work. Please suggest if the same SQL can be improved to get the details in the expected format or should I use another solution.

select job_details.*
  from test_xml_table t,
       xmltable ('/Root/ParentTag'
                  passing t.col 
                  columns 
                    job_name varchar2(2000) path '@name',
                    attribute1 varchar2(2000) path '@attrib1',
                    attribute2 varchar2(2000) path '@attrib2',
                    childAttribute1 varchar2(2000) path '/ChildTag/@childAttrib1'
                ) job_details;

I'm not forced to have a SQL solution, but would if it can be in SQL.

Kind regards

Laureline.

Post edited by: Jen K - added the SQL, I tried to build.

Well, the XML contains hierarchical data, and SQL is a "dish" of data, so it's up to you to treat lines that are coming out of the flat style and determine how to get that in separate tables.

Suppose that we have several nodes of ParentTag each containing several nodes of ChildTag...

SQL > ed
A written file afiedt.buf

1 with t (xml) as (select xmltype ('))
2
3
4
5
6
7

8
9
10
11
12

13
') of double)
14-
15 end of test data
16-
17 select x.p
18, x.name, x.attrib1, x.attrib2
19, including
20, y.childattrib1, y.childattrib2
21 t
22, xmltable ('/ Root/ParentTag ')
23 passage t.xml
p 24 columns for ordinalite
25, path name varchar2 (10) '. / @name'
26, path of varchar2 (10) of attrib1 '. / @attrib1 '


27, way to varchar2 (10) of attrib2 '. / @attrib2 '
28 children xmltype road '.'
29                 ) x
30, xmltable ('/ ParentTag/ChildTag ')
passage 31 x.children
c 32 columns for ordinalite
33, path of varchar2 (10) of childattrib1 '. / @childAttrib1 '
34 road of varchar2 (10) of childattrib2 '. / @childAttrib2 '
35*                ) y
SQL > /.

P NAME ATTRIB1 ATTRIB2 C CHILDATTRI CHILDATTRI
---------- ---------- ---------- ---------- ---------- ---------- ----------
1 text JobName SomeOtherT 1 SomeValue1 value2
1 text JobName SomeOtherT 2 SomeValue3 SomeValue4
1 text JobName SomeOtherT 3 SomeValue5 SomeValue6
JobName2 TextX SomeOtherT 1 SomeValue6 SomeValue8 2
JobName2 TextX SomeOtherT 2 SomeValue7 SomeValue9 2

Using the 'ordinalite' gives us the line number for this node in the XML file, so that you can identify each parent as well as to say who is the first record of this parent (because it will have a child with the ordinalite 1).

An INSERT ALL tuition assistance we can insert into two different tables at the same time to keep related data... for example

SQL > create table tbl1 (pk number, name varchar2 (10), attrib1 varchar2 (10), attrib2 varchar2 (10))
2.

Table created.

SQL > create table tbl2 (parent_pk number, attrib1 varchar2 (10), attrib2 varchar2 (10))
2.

Table created.

SQL > insert all
2 when c = 1 then
3 in the tbl1 (pk, attrib1, attrib2)
4 values (p, attrib1, attrib2)
When 5 1 = 1 then
6 in the tbl2 (parent_pk, attrib1, attrib2)
7 values (p, childattrib1, childattrib2)
8 with t (xml) as (select xmltype ('))
9
10
11
12
13
14

15
16
17
18
19

20
') of double)
21 select x.p
22, x.name, x.attrib1, x.attrib2
23, including
24, y.childattrib1, y.childattrib2
25 t
26, xmltable ('/ Root/ParentTag ')
27 passage t.xml
p 28 columns for ordinalite
29, path name varchar2 (10) '. / @name'
30, path of varchar2 (10) of attrib1 '. / @attrib1 '
31, path of varchar2 (10) of attrib2 '. / @attrib2 '
32 children xmltype road '.'
33                 ) x
34, xmltable ('/ ParentTag/ChildTag ')
passage 35 x.children
c 36 columns for ordinalite
37, path of varchar2 (10) of childattrib1 '. / @childAttrib1 '
38, path of varchar2 (10) of childattrib2 '. / @childAttrib2 '
39                 ) y
40.

7 lines were created.

SQL > select * from tbl1;

PK ATTRIB1 ATTRIB2 NAME
---------- ---------- ---------- ----------
1 text JobName SomeOtherT
2 JobName2 TextX SomeOtherT

SQL > select * from tbl2.

PARENT_PK ATTRIB1 ATTRIB2
---------- ---------- ----------
1 SomeValue1 value2
1 SomeValue3 SomeValue4
1 SomeValue5 SomeValue6
SomeValue6 2 SomeValue8
SomeValue7 2 SomeValue9

Tags: Database

Similar Questions

  • Parsing XML and get the attributes of a tag

    Hello

    When parsing XML for application of Cascades in C++, I am able to get the value of a tag as follows:

    00000

    But I also want to get the attributes of a tag:

    But I don't know how to get the 'CA' and 'California' attributes with my current code.  Can anyone help?  Here is the code I use to parse the XML code:

    void CMController::requestFinished(QNetworkReply* reply) {
    
        if (reply->error() == QNetworkReply::NoError) {
    
            QXmlStreamReader xml;
    
            QByteArray data = reply->readAll();
            xml.addData(data);
    
            QString zip;
            QString id;
            QString location;
    
            while (!xml.atEnd() && !xml.hasError()) {
    
                /* Read next element.*/
                QXmlStreamReader::TokenType token = xml.readNext();
    
                /* If token is just StartDocument, we'll go to next.*/
                if (token == QXmlStreamReader::StartDocument) {
                    continue;
                }
    
                /* If token is StartElement, we'll see if we can read it.*/
                if (token == QXmlStreamReader::StartElement) {
    
                    if (xml.name() == "zip") {
                        zip = xml.readElementText();
                    }
    
                    if (xml.name() == "id") {
                        ???
                    }
    
                    if (xml.name() == "location") {
                        ???
                    }
    
                }
    
            }
    
            emit succeeded(result);
    
        } else {
            emit failed();
        }
    
        reply->deleteLater();
    
    }
    

    Thank you!

    I found a working example:

    if(xml.name() == "state"){
        QXmlStreamAttributes attrib = xml.attributes();
        QStringRef ref = attrib.value("location");
        qDebug() << "location: " << ref;
    }
    
  • Parsing XML and get the required data only using PLSQL

    Hi friends,

    I have a XML data

    < MAJOR_LINE >

    < LINEID > 143424538 < / LINEID >

    nom_element < ITEMNAME > = < / ITEMNAME >

    < > 78245 ITEMPATH < / ITEMPATH >

    < QUANTITY > 10 < / QUANTITY >

    < MINORLINE >

    < LINEID > 143424799 < / LINEID >

    TCC_ITEM_NAME < ITEMNAME > < / ITEMNAME >

    < > 78245 ITEMPATH < / ITEMPATH >

    < QUANTITY > 10 < / QUANTITY >

    < MINORLINE LINEID = "123456_line_id" xmlns = "xxyyzz" >

    < message > < / message >

    < status > < / status >

    < covered_Product_line_id > '123_coveredProductLineID '.

    < / covered_Product_line_id >

    < itemName > < / itemName >

    < quantity > < / quantity >

    "< service lineId ="456_service_line_id">."

    "< covered_Product_line_id >"123_coveredProductLineID"

    < / covered_Product_line_id >

    < productAttributes / >

    < itemType > < / itemType >

    < itemPath > < / itemPath >

    < coveredProducts childProductLineId = "" / > "

    < / coveredProducts >

    < parentCoverage / >

    < / service >

    < / MINORLINE >

    < / MINORLINE >

    < / MAJOR_LINE >

    I want to extract only the Covered_product_line_id and the Service_line_id of the above XML format, these data can come from any where in the xml file and the xml can be any length.

    First we need to find the covered_product_line_id and the service_line_id associated with line_id, (as I pointed out in bold) here only a single pair i showed, but it can be in any number. (Note the line_id is inside the tag).

    #PLSQL

    Help, please.

    Thanks in advance

    Hey Odie,

    Me do string literal too long error:

    Select x.*

    from xmltable)

    XmlNamespaces(default ')

    , ' for $i in //serviceLine

    , $j in $i / coveredProduct

    Returns the element r {}

    $i / lineId

    , $j/childProductLineId

    }'

    from xmltype (')

    45146937

    N20

    1

    63090598

    CON-S

    1

    SNT

    UCS - IOM

    342544294

    N20-FW012

    342544295

    342544294

    UCS-IOM2

    1

    N20-C6508-UPG:

    45146937

    CON-S

    1

    SNT

    342544295

    N20-FW012

    1

    N20-C6508-UPG:

    45146937

    CON-SN

    1

    SNT

    342544296

    FET - 10G

    16

    N20-C6508 - UPG:U SC EXPERIENCE

    342544297

    UCSB-5108-PKG-FW

    1

    N20-C6508-UPXPANSION O

    342544298

    N20-CBLKP

    2

    N20-C6508 - UPG:0 - CBLKP

    342544299

    N01-UAC1

    1

    N20-C6508 - UPG:N01 - UAC1

    342544300

    N20-CBLKI

    1

    N20-C6508 - UPG:U HC EXPANSION OPT: N20-CBLKI

    342544301

    N20-FAN5

    8

    N20-C6508 - UPG:U HC EXPANSION OPT: N20-FAN5

    342544302

    N20-CBLKB1

    6

    N20-C6508-UPG-CBLKB1

    342544303

    N20 - CAK

    1

    N20-C6508-OPT: N20 - CAK

    342544304

    UCSB-B420-M3-D

    1

    N20-C6508-UP-B420-M3-D

    63090594

    CON-SNT-B420M3D

    1

    SNT

    UCS-UC-E5-4617

    342544305

    UCS-ML-1X324RY-A

    342544306

    342544305

    UCS-UC-E5-4617

    2

    N20-C6508 - UPG:PU - E5-4617

    342544304

    CON-SNT-B420M3D

    1

    SNT

    342544306

    UCSRY-A

    2

    N20-C624RY-A

    342544304

    CON-SNT-B420M3D

    1

    SNT

    342544307

    UCS0MS

    1

    N FIO-1600MS

    63090595

    CON-SNT-FIOB16MS

    1

    SNT

    342544308

    N2KD

    4

    N20-C6LKD

    342544309

    UCSB-HS-01-EP

    2

    N20-C65B-HS-01-EP

    342544310

    N1K-VSG-UCS-BUN

    1

    N20-C6508 - UPG:U-BLA1K-VSG-UCS-BUN

    342544311

    VSG-VLEM-UCS-1

    1

    N20-C6508 - UPG:U BLN1K BUN: VSG-VLEM-UCS-1

    63090596

    CON-SAU-VSGUCS

    1

    SAU

    342544312

    N1K-VLEM-UCS-1

    1

    N20-C6508CS-BUN: VMW N-UCS-1

    63090597

    CON-SAU-VLEMUCS

    1

    SAU

    342544313

    UCSB-ACDV

    2

    N20ACDV

    342544314

    R2XX-DMYMPWRCORD

    2

    PWRCORD N20 - C6

    ')

    columns for the ordinalite seq_id

    , path number child_product_line_id "childProductLineId".

    , service_line_id number path "lineId.

    ) x ;

  • How to acquire and store the values of DAQmx analog voltage (I do not want the graphic, but strings and values in a chart)?

    Hello

    How acquire and store the values of voltage DAQmx?

    I tried several code example, but they can't get the chart. I don't want to chart. I want to measure exactly the analog voltage values and record these values - as an excel chart, that contains the selected channels and voltage values.

    What the example code that I can use?

    My hardware is NI PCI-6251.

    Thank you very much.


  • Download picture of URL link and store the Image in a Local folder in BB10 Webworks

    Hello

    I want to download the image of URL link and store the image in a local folder in Webworks BB10.
    But I did not get the code for this.

    If such knowledge code or have any solution then please help me...

    Thank you best regards &,.

    Laurent Subudhi

    NitishSubudhi wrote:
    I go through this code... but it is throwing the exception. That is to say "ReferenceError: Webworks is undefined '." "

    According to the device/operating system, you need to add the extension of your installation of WebWorks as explained here for OS SmartPhone BB or PlayBook OS.

    To use read the samples provided, they must work somehow. When I worked with the extension on PlayBook I only copy + pasted the provided source code and changed the attributes for the function call:

    // You need to define "remotePath", "localPath", "onProgress", "onError", "options" like shown in documentationblackberry.io.fileTransfer.downloadFile(remotePath, localPath, onProgress, onError, options);
    

    For OS SmartPhone BB the function call looks like this:

    // You need to define "options" like shown in documentationwebworks.io.FileDownloader.download(options);
    

    All think that all information provide here, try to follow and cela should operate.

  • Parse XML and insert into the table Oracel

    Hi all

    I have an XML document, I need to analyze and take the respective tag data and inserting it into another table.

    This is the XML code that I have.

    " < convertTo xsi: schemaLocation =" https://xecdapi.XE.com/schema/v1/convertTo.xsd "> "

    < terms > http://www.XE.com/privacy.php < / terms >

    < privacy > http://www.XE.com/legal/DFS.php < / privacy >

    < to > < /pour > USD

    < amount > 1.0 < / amount >

    < timestamp > 2015-10-25T 23: 00:00Z < / timestamp >

    < from >

    rate <>

    < currency > EUR < / currency >

    < e > 0.9075541422 < / mid >

    < / rates >

    rate <>

    INR < currency > < / currency >

    < e > 65.0313451105 < / mid >

    < / rates >

    rate <>

    < currency > CAD < / currency >

    < e > 1.3167560135 < / mid >

    < / rates >

    rate <>

    < currency > GBP < / currency >

    < e > 0.6528693249 < / mid >

    < / rates >

    < / from >

    < / convertTo >


    Here is the code I use to analyze the values

    DECLARE

    XMLType x: = XMLType)

    ' ' < convertTo xsi: schemaLocation = " https://xecdapi.XE.com/schema/v1/convertTo.xsd "> "

    < terms > http://www.XE.com/privacy.php < / terms >

    < privacy > http://www.XE.com/legal/DFS.php < / privacy >

    < to > < /pour > USD

    < amount > 1.0 < / amount >

    < timestamp > 2015-10-25T 23: 00:00Z < / timestamp >

    < from >

    rate <>

    < currency > EUR < / currency >

    < e > 0.9075541422 < / mid >

    < / rates >

    rate <>

    INR < currency > < / currency >

    < e > 65.0313451105 < / mid >

    < / rates >

    rate <>

    < currency > CAD < / currency >

    < e > 1.3167560135 < / mid >

    < / rates >

    rate <>

    < currency > GBP < / currency >

    < e > 0.6528693249 < / mid >

    < / rates >

    < / from >

    < / convertTo > '

    );

    BEGIN

    FOR r IN

    (

    SELECT

    Name of the AS ExtractValue (Value (p),'/ rate/currency/text () ')

    -, ExtractValue (value (p), '/ Row/Address/State/Text ()') State

    -, ExtractValue (value (p), '/ Row/Address/City/Text ()') city

    Of

    TABLE (XMLSequence (Extract(x,'convertTo/from/rate'))) p

    )

    LOOP

    -do what you want with r.name, r.state, r.city

    dbms_output.put_line ('Name' | r.Name);

    END LOOP;

    END;

    I get the error message below

    Error report:

    ORA-31011: XML parsing failed

    ORA-19202: an error has occurred in the processing of XML

    LPX-00234: the 'xsi' namespace prefix is not declared

    Error on line 1

    ORA-06512: at "SYS." XMLTYPE", line 310

    ORA-06512: at line 2

    31011 00000 - "XML parsing failed"

    * Cause: XML parser returned an error trying to parse the document.

    * Action: Check whether the document to parse is valid.

    Any help on how to fix this would be really useful.

    Appreciate your time and your help.

    Thank you

    Olivier

    Have you even tried to do what we have suggested?

    SQL > ed
    A written file afiedt.buf

    1 with t as (select xmltype ('))
    "" 2 http://xecdapi.xe.com "xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"" xsi: schemaLocation = "https://xecdapi.xe.com/schema/v1/convertTo.xsd" > ""
    3 http://www.xe.com/privacy.php
    4 http://www.xe.com/legal/dfs.php
    5 USD
    6    1.0
    7 2015-10 - 25 T 23: 00:00Z
    8
    9
    10 EUROS
    11 0.9075541422
    12

    13

    14
    ") in XML of the double)"
    15-
    16 end of test data
    17-
    18 select x.*
    19 t
    20, xmltable (xmlnamespaces ("http://www.w3.org/2001/XMLSchema-instance" as "xsi", default 'http://xecdapi.xe.com'),)
    21 ' / convertTo/of/rate.
    22 passage t.xml
    path of VARCHAR2 (3) currency 23 columns '. / currency '
    24, half-way number '. / mid'
    25*                ) x
    SQL > /.
    HEART MI
    --- ----------
    EUR.907554142

    1 selected line.

  • Can I include a signature hosted on a remote server, create the signature in Tunderbird and store the file locally?

    I want to insert a signature that I hosted on a web server without having to create and save the local html file on my computer, is it possible? I know that I can insert a picture from a web server as part of my signature, which is not what I'm asking. Is there an add-on or anything else that can help me to insert my signature from a web server directly, without having to host the file locally?

    You do not have to store the signature on your computer, but Thunderbird will not bind to a text or HTML signature on a remote server file.

    Thunderbird is waiting for you to provide a simple signature to provide the URL to the 'IMAGE' stored on the remote server and this link should be included in Thunderbird, if not how to be referenced in the message?

    You can always include a link to the text that is stored remotely or a HTML signature in your message, but the recipient will activate it? Once again this link would be stored in the message

    TB - 38, 3 Win10-PC

  • The file of the bar - descriptor.xml (and make the application of command line)

    I made a game with air and it is online for sale on Android and iOS. It is somewhat popular and I thought to put up on Blackberry for quite awhile now and with the Port of soon-to-start-A-Thon, this seems to be a great time to finally make it.

    BlackBerry is not very common that here where I live in Sweden, however it still looks like an interesting with a potential platform if I want to get the trip. Unfortunately I don't own a camera myself so I'll use the Simulator. With some graphic problems with the simulator when running in mode BB10DevAlpha (icons does not appear right) and the Simulator is very slow when running in mode BB10DevAlphaSafe (chart appears on the right, but it seems that updating them requires more CPU my computer are available).

    The game is built using nothing other than Adobe Flash Professional CS6 and a bunch of command line tools to build the package and sign. I've only got an old computer with Windows XP now since the death of my main PC, all at the time and since the Port-A-Thon is just a few days I do with what I got.

    Firstly I understand that only AIR 3.1 is supported by Blackberry 10, so I use the old AIR SDK 3.1 to create a SWF (flash) file.

    What I really need to do should be used in the exported SWF file of the game, then use the command line tools provided by RIM to build the package, right?

    Except that I did not count on bar - descriptor.xml to be so difficult to understand.

    I was brought to the documentation here: https://developer.blackberry.com/air/documentation/bb10/bar-descriptor_config_file.html

    It says Adobe AIR at the top, the platform selected is Blackberry 10 and the title says "bar-descriptor configuration file", so it must be in the right place!

    I start by trying the 'bar-descriptor configuration example file"on this page:

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



      
          None
          fake
      

     
      
       Name of the author
     
      
       gXXXxXXx ##XxXxXxxxXxXX #xxx
     
      
       Core.Games
     
      
       Icon.PNG
     
      
       HelloWorld - splash.png
     
      
       read_geolocation
       use_camera
     
      
       1

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

    Of course during the test I replaced a few things in the example above with the correct filenames for images etc, I just copied the example of right - off this time to you guys show what I mean.

    Firstly, I extract "blackberry-tablets-sdk - 3.0.0" in a folder on the disc, then I make sure as a full path to the "bin" in the SDK folder inside the path on the OS environment variable.

    Then I read on "Applications of Test using the command line": https://developer.blackberry.com/air/documentation/bb10/testing_your_application_cmd_ms_2010851_11.h...

    Now I run:

    BlackBerry - airpackager.bat - package installApp - blackberry-myappname - new.bar - launchApp myappname-blackberry-bar - descriptor.xml myappname.swf myappnameicon86.png bg splashscreen1024.png - device 192.168.8.128

    Note that "bg" is a folder with 500 images that must be accessible from the app. I hope that I can just add the folder like this and not type a path to each image file...

    What I get (in lib\adt.jar via the bat file):

    error 101: Namespace is missing
    Error: Validation of the AIR is not

    Okay, so the example did not straight on the box.

    Now, I've read all paragraphs in the first URL I linked above ("the bar-descriptor configuration file"). I start my own XML file and make sure to include everything that is marked as "necessary". That's what I'm left with:

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



        MyCompany
        
            
            com.mydomain.myappname
            My App name
            3.0.0
            
                splashscreen1024.PNG
            

            1.5.0
        

        run_native
        
            application
            
                bb.action.VIEW
                application/octet-stream
            

        

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

    I have no idea of what concerns the block whole call target, but it took, so he must be there.

    Now I launch (notice that myappnameicon86.png is gone since no icon is mentioned in the above XML code, it is not mandatory):

    BlackBerry - airpackager.bat - package installApp - blackberry-myappname - new.bar - launchApp myappname-blackberry-bar - descriptor.xml myappname.swf bg splashscreen1024.png - device 192.168.8.128

    Yet once, I get:

    error 101: Namespace is missing
    Error: Validation of the AIR is not

    Frustrated I get autour on the forums for answers, because the official documentation is nowhere getting me.

    I'm left with this:

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


    http://ns.Adobe.com/air/application/3.1">
        com.mydomain.myappname
        1.5.0
        
        My App name
        
        My App name
        
        
            myappname.swf
            standard
            fake
            true
            true
            landscape
            GPU
            fake
        

        
            myappnameicon36.PNG
            myappnameicon48.PNG
            myappnameicon72.PNG
        

        fake
        fake
        
            qnx.fuse.ui.skins.QNXDevice
            qnx.fuse.ui.skins.QNXNetwork
            qnx.fuse.ui.skins.QNXSensors

            qnx.fuse.ui.skins.QNXSkins
        

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

    Looks like the XML code that I use when I build for Android.

    First of all it doesn't have the tag root of qnx, but also nothing of the icons are of the required size (86 x 86). The tag required splashscreens and invoke target is also absent, to name a few. No idea of what the entire block of 'extensions' really do.

    Surely, this does not work:

    BlackBerry - airpackager.bat - package installApp - blackberry-myappname - new.bar - launchApp myappname-blackberry-bar - descriptor.xml myappname.swf QNXDevice.ane QNXNetwork.ane QNXSensors.ane QNXSkins.ane myappnameicon36.png myappnameicon48.png myappnameicon72.png bg-device 192.168.8.128

    Success in building the package BAR to my infinite surprise!

    He even managed to install on the Simulator. An icon for the game. However when it auto-couru the app went into landscape, thought for a second and then crashed (or you leave?) without a message.

    Perhaps because the required qnx tag was missing in the XML?
    Perhaps because images in the bg file could not be loaded?
    Perhaps because he had no permission to keep screen from dimming?

    I have no idea. I tried to add XML to qnx at the address previous to the bar - descriptor.xml, I thought that maybe he needed both the qnx block for when you run the application and the application block for when packaging. But now, he has complained of something like XML is not not clean ("' fatal error: markup in the document following the root element must be well-formed." ").

    So he came to it, I have to ask for help if I ever make the deadline of the Port-A-Thon.

    (1) how am I supposed to write the bar - descriptor.xml?
    (2) what command line starting by "blackberry - airpackager.bat" is OK to use?
    (3) all I have to do is build the SWF using Adobe Flash Professional CS6 and then pack it using the Blackberry SDK, right?

    First of all, there are two xml files that you need.

    One is called the manifesto, is to AIR and is called yourappname- app.xml. It is identical to the ones you use for Android and IOS, though some elements will be ignored. It's one you need to switch on the command line, and is probably causing the 'Namespace' missing error message. A file manifest a minimum is:

    
    http://ns.adobe.com/air/application/3.1">
    
        com.example.appname
        My Fabulous Game
        1.0.0
    
        FileNameOfYourSwfWithoutExtension
        YourCompanyName
        
            [This value will be overwritten by Flash Builder in the output app.xml]
            true
            false
            none
            cpu
            false
        
    
    

    Replace the text in red with your own stuff.

    The second xml file is called to the bar of descriptor. It is for App World and the installation process and is called bar - descriptor.xml. It contains information about signing code, icon, permissions etc. A simple bar - descriptor.xml is:

    
    
       
          none
          true
          landscape
          false
          cpu
       
    
       
       your-name-on-certificate
       your-id-on-certificate
    
       core.games
    
       
       1
    
       
       
          icon86x86.png
       
       splash-landscape.png
    
       
       2.1.0.1314
    
       
       access_shared
       access_internet
       play_audio
       set_audio_volume
    
    

    Make sure that you at least change the red dots.

  • How to download and store the file in the device

    I need to download and save a file to the server. Can any one go code me for this example.

    Example of solution download a file via the URL: http://supportforums.blackberry.com/t5/Cascades-Development/How-to-download-zip-file-And-also-open-e...
    It stores the file in your sandbox app directory. After that you can move anywhere.

  • Compare 2 different versions of xml and highlite the differences

    Hello

    Currently we have xml and which is displayed on the web page using css style sheets.
    The same xml that we remain majority but with small changes (different say version created after a week).

    We want to be able to follow the differences with the previous version and highlight the differences, when to display in the web page.
    Please let know us if this is possible and how.

    Thank you.

    What is your version of the database? (SELECT * FROM version$ v)

    On 11.2.0.3, update of XQuery can be useful.

    On lower versions, I'd do it like this:

    SQL> WITH sample_data AS (
      2   SELECT xmltype(
      3  '
      4    
      5      7934
      6      MILLER
      7      CLERK
      8      7782
      9      1982-01-23T00:00:00
     10      1300
     11      
     12      10
     13    
     14  ') doc1,
     15  xmltype('
     16    
     17      7934
     18      MILLER
     19      CLERK
     20      7782
     21      xyz
     22      1982-01-23T00:00:00
     23      1300
     24      
     25      10
     26    
     27  ') doc2
     28   FROM dual
     29  )
     30  SELECT XMLSerialize(document
     31           XMLPatch(
     32             doc1
     33           , XMLQuery(
     34              'declare namespace xd = "http://xmlns.oracle.com/xdb/xdiff.xsd"; (: :)
     35               declare function local:copy($itemset as item()*) as item()* {
     36                 for $i in $itemset
     37                  return
     38                   typeswitch($i)
     39                     case element(xd:content) return element {node-name($i)} { {local:copy($i/(node()|@*))} }
     40                     case element() return element {node-name($i)} { local:copy($i/(node()|@*)) }
     41                     default return $i
     42               }; local:copy(*)'
     43               passing XMLDiff(doc1, doc2)
     44               returning content
     45             )
     46           )
     47           as clob indent
     48         )
     49  FROM sample_data
     50  ;
    
    XMLSERIALIZE(DOCUMENTXMLPATCH(
    --------------------------------------------------------------------------------
    
      
        7934
        MILLER
        CLERK
        7782
        
          xyz
        
        1982-01-23T00:00:00
        1300
        
        10
      
    
     
    

    Basically, take us the XMLDiff output and modify it slightly to insert the tag . Then, simply call the XMLPatch function with this newly formed Xdiff document.

    Note that I would normally use XSLT (identity model) to modify Xdiff output but there seems to be a bug when dealing with node Processing, where my using the equivalent of XQuery.

    Published by: odie_63 on September 13. 2012 16:14

  • Need help to read a _fmb. XML and write the properties of the element to a table

    We want to retrieve all the properties of elements of forms at a table.
    Table has this format:
    Describing oracle_forms_item_list....
    NAME                            Null?     Type
    ------------------------------- --------- -----
    FORM_NAME                       NOT NULL  VARCHAR2(100)
    ITEM_NAME                       NOT NULL  VARCHAR2(50)
    ITEM_TYPE                       NOT NULL  VARCHAR2(50)
    PROPERTY                        NOT NULL  VARCHAR2(50)
    PROPERTY_VALUE                            VARCHAR2(500)
    We want to get all D_e_p_a_r_t_m_e_n_t_s.fmb items (blocks, paintings, text etc.). So first convert us it to XML and we get the D_e_p_a_r_t_m_e_n_t_s_fmb.xml file which is shown below.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <Module version="101020002" xmlns="http://xmlns.oracle.com/Forms">
       <FormModule Name="D_E_P_A_R_T_M_E_N_T_S" ConsoleWindow="WINDOW1" DirtyInfo="true" MenuModule="DEFAULT&amp;SMARTBAR" Title="MODULE5">
          <Coordinate CharacterCellWidth="7" CoordinateSystem="Real" CharacterCellHeight="14" RealUnit="Point" DefaultFontScaling="true"/>
          <Alert Name="ALERT6" DirtyInfo="true" DefaultAlertButton="Button 2" AlertMessage="Do you want to save ???" Button2Label="No" AlertStyle="Caution" Title="Saving........................... &lt;>" Button1Label="Yes"/>
          <Block Name="DEPT" ScrollbarTabPageName="" DirtyInfo="true" QueryDataSourceName="dept" ScrollbarWidth="14" ScrollbarYPosition="39" ShowScrollbar="true" ScrollbarCanvasName="CANVAS4" ScrollbarLength="70" RecordsDisplayCount="5" ScrollbarXPosition="237">
             <Item Name="DEPTNO" DirtyInfo="true" Height="14" PromptAlign="Center" XPosition="14" Width="27" ColumnName="DEPTNO" DataType="Number" YPosition="39" PromptDisplayStyle="First Record" ItemsDisplay="0" MaximumLength="3" PromptAttachmentEdge="Top" ItemType="Text Item" TabPageName="" CanvasName="CANVAS4" Prompt="Deptno"/>
             <Item Name="DNAME" DirtyInfo="true" Height="14" PromptAlign="Center" XPosition="41" Width="101" ColumnName="DNAME" YPosition="39" Tooltip="Dep name goooes here." DataLengthSemantics="BYTE" Hint="Entter the department name" PromptDisplayStyle="First Record" ItemsDisplay="0" MaximumLength="14" PromptAttachmentEdge="Top" ItemType="Text Item" TabPageName="" CanvasName="CANVAS4" Prompt="Dname"/>
             <Item Name="LOC" DirtyInfo="true" Height="14" PromptAlign="Center" XPosition="142" Width="95" ColumnName="LOC" YPosition="39" DataLengthSemantics="BYTE" PromptDisplayStyle="First Record" ItemsDisplay="0" MaximumLength="13" PromptAttachmentEdge="Top" ItemType="Text Item" TabPageName="" CanvasName="CANVAS4" Prompt="Loc"/>
             <DataSourceColumn Type="Query" DSCType="NUMBER" DSCNochildren="false" DSCLength="0" DSCPrecision="2" DSCName="DEPTNO" DSCScale="0" DSCMandatory="false"/>
             <DataSourceColumn Type="Query" DSCType="VARCHAR2" DSCNochildren="false" DSCLength="14" DSCPrecision="0" DSCName="DNAME" DSCScale="0" DSCMandatory="false"/>
             <DataSourceColumn Type="Query" DSCType="VARCHAR2" DSCNochildren="false" DSCLength="13" DSCPrecision="0" DSCName="LOC" DSCScale="0" DSCMandatory="false"/>
          </Block>
          <Canvas Name="CANVAS4" ViewportHeight="324" DirtyInfo="true" Height="324" WindowName="WINDOW1" Width="540" ViewportWidth="540" CanvasType="Content">
             <Graphics Name="FRAME5" GraphicsText="" FrameTitleOffset="14" Height="108" VerticalMargin="14" GraphicsFontColor="" GraphicsFontSpacing="Ultradense" Width="251" GraphicsFontSize="0" GraphicsFontWeight="Ultralight" StartPromptOffset="7" FillPattern="none" GraphicsFontColorCode="0" HorizontalObjectOffset="0" EdgeBackColor="white" FrameTitle="Departments" ShowScrollbar="true" RecordsDisplayCount="5" LayoutStyle="Tabular" DirtyInfo="true" XPosition="7" Bevel="Inset" GraphicsFontStyle="0" ScrollbarWidth="14" HorizontalMargin="7" FrameTitleSpacing="7" EdgePattern="solid" YPosition="15" GraphicsType="Frame" GraphicsFontName="" LayoutDataBlockName="DEPT"/>
          </Canvas>
          <ProgramUnit Name="ASK_FROM_USER" ProgramUnitType="Function" ProgramUnitText="FUNCTION ask_from_user RETURN BOOLEAN IS&amp;#10; v_button number;&amp;#10;BEGIN&amp;#10;  v_button := SHOW_ALERT('ALERT6');&amp;#10;  &amp;#10;  if v_button = ALERT_BUTTON2 THEN&amp;#10;       RETURN false;&amp;#10;  ELSE&amp;#10;       RETURN TRUE;&amp;#10;  END IF;&amp;#10;END;"/>
          <Trigger Name="POST-DATABASE-COMMIT" TriggerText="/*&amp;#10;   Created by ABC de Silva&amp;#10;   &lt;&lt;&lt;&lt;&lt;..>> &amp;#10;   testing for special characters &lt; rock &amp; roll &amp;#10;*/&amp;#10;BEGIN&amp;#10;     MESSAGE('*** Records successfully &lt;&lt;&lt;> commmited to the DB. ***');&amp;#10;     PAUSE;&amp;#10;END;" DirtyInfo="true"/>
          <Window Name="WINDOW1" Height="324" Width="540"/>
       </FormModule>
    </Module>
    Now, we want to read this file with UTL_FILE (in a PL/SQL stored procedure) and fill in the chart above like this:
    FORM_NAME                  ITEM_NAME   ITEM_TYPE  PROPERTY         PROPERTY_VALUE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
    ----------------------------------------------------------------------------------------------------------
    D_e_p_a_r_t_m_e_n_t_s.fmb  ALERT6      Alert      Title            Saving........................... <>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
    D_e_p_a_r_t_m_e_n_t_s.fmb  DEPTNO      Text Item  Prompt           Dname                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    D_e_p_a_r_t_m_e_n_t_s.fmb  DEPTNO      Text Item  MaximumLength    3                                                                                                                                                                                                                                                                                                                                     
    It's, I went through Google, nobody can give a complete solution. All are partial solutions.

    Any help will greatly be apprectiated.

    Published by: Channa on 30 Sep 2011 06:31

    Here goes:

    select x1.item_name
         , x1.item_type
         , x2.property
         -- to convert back entities such as 
     to their character values :
         , utl_i18n.unescape_reference(x2.property_value) as property_value
         -- parent information :
         , x1.parent_item_name
         , x1.parent_item_type
    from xmltable(
           xmlnamespaces(default 'http://xmlns.oracle.com/Forms', 'http://xmlns.oracle.com/Forms' as "def")
         , 'for $i in /Module/descendant::*[@def:Name]
            return element item {
              attribute item_name {data($i/@def:Name)}
            , attribute item_type {local-name($i)}
            , attribute parent_item_name {data($i/parent::*/@def:Name)}
            , attribute parent_item_type {local-name($i/parent::*)}
            , $i
            }'
           passing xmltype(bfilename('TEST_DIR','module2.xml'), nls_charset_id('AL32UTF8'))
           columns item_name         varchar2(50) path '@item_name'
                 , item_type         varchar2(50) path '@item_type'
                 , parent_item_name  varchar2(50) path '@parent_item_name'
                 , parent_item_type  varchar2(50) path '@parent_item_type'
                 , item              xmltype      path '.'
         ) x1
       , xmltable(
           xmlnamespaces(default 'http://xmlns.oracle.com/Forms', 'http://xmlns.oracle.com/Forms' as "def")
         , 'for $i in /item/*/attribute::def:*
            let $propname := local-name($i)
            where $propname != "Name"
            return element p {
              element name {$propname}
            , element value {data($i)}
            }'
           passing x1.item
           columns property       varchar2(50)  path 'name'
                 , property_value varchar2(500) path 'value'
        ) x2
    ;
    

    To make it easier, instead of calculating an ID, the information of the parent are given as (parent_name, parent_type).

  • Double click and get and store the value in the variable.

    Hello

    It is my intention when I double click on a particular record on a table, I want to enter or store the specific record value in a variable and call this variable in the print/preview PLSQL code button.

    Below, I show the screenshot that contains a preview in the form of table and print button. After filling in the data. user double click the code officer LC354 and click Print Preview/mode button, it should display the report for only the
    Code of the agent of LC354(it's what I want). But normally when I click Preview before printing it affects wil see the report of the code of the agent of LC354 and LC325(which I don't).

    http://ImageShack.us/photo/my-images/811/printpb.PNG/

    My problem is how to capture the value ((*LC354*)) particular registration after double click the code(*LC354*) agent?

    I tried to store the agent code in the variable AG_CNT in mouse double click trigger with after the plsql code. but it dosent work.
    declare
    AG_CNT varchar2(10);
    begin
    *AG_CNT* :=GET_ITEM_PROPERTY('RFQ_AGENT_DETAILS.AGENT_CODE',CURRENT_RECORD);
    end;
    After that pass this AG_CNT value in *: AG_CODE *. the code below is in the Print/Preview button.
         cursor c1 is select nvl(count(ENQUIRY_NO),0) from scott.EXP_QUOTE_STATUS 
         where ltrim(rtrim(upper(job_status))) like 'APPROVED%' and ENQUIRY_NO = :REQ_FOR_QUOT.ENQUIRY_NO
    AND AGENT_CODE=*:AG_CODE* ;
    How to do this?

    SKUD.

    Hello

    When you click a folder, the focus moves to that record. To get the values of each element, just use the standard:

    :value := block.item ;
    

    François

  • Help needed to create a POP UP window and stores the values of the custom tab

    Hello

    I have a requirement to store a program competing in a custom table name.

    Fields are concurrent_program_name, user_concurrent_program_name (of fnd_concurrent_programs_vl) and end_user_column_name (fnd_descr_flex_col_usage_vl setting) I finished the job of script to fill the value in the table.

    Now the problem is that I have to design a creation page which have concurrent_program_name (LOV) and user_concurrent_program_name (MTI) and setting (link)

    If the user selects the value in concurrent_program_name means LOV it should display a relevant user_concurrent_program_name (in MTI) and (window) settings.

    So I create card LOV in Concurrent_program_name as follows: 1. the concurrent_program_name card 2. Map of the user_concurrent_program_name.

    Now I select an LOV concurrent_program_name and it shows a user_concurrent_program_name in MTI. (Works fine)

    I need help how to go ahead with parameters.

    If the user clicks on the link he must navigate the window pop up and displays the values of the settings, now I need to keep the close button (if the close button hit the user navigates to page creation.) and if the user hit the button Save page create then it should record the following values of custom table (concurrent_program_name user_concurrent_program_name and settings).

    Pls give me an idea to go ahead and also give me some articles about it.

    Thank you

    Corinne Bertrand

    check out this blog to create a popup window http://mukx.blogspot.com/2007/07/javascript-in-oa-framework.html

    You can create a button with 'Window.Close ()' to close the window...
    You can get the parameters of CP in the following query

    SELECT * from fnd_descr_flex_col_usage_vl
    where as descriptive_flexfield_name ' $srs$. CONCURRENT_PROGRAM'
    AND APPICATION_ID = xx

    Warning : do not do transactions with the pop-up window.

    For information about how to create the page, see Create exercise...

    Prasanna-

  • Assistance needed for the registration of the application and store the values in a table

    Hello

    Hope that this explanation is not confusing. I explained my application you want in the text below and also attached a skeleton VI + screenshot hoping that he will clarify

    I try to do a VI that does the following:
    1. some code (blue Subvi) runs every 200ms
    2. every 200ms, a random number is generated
    3. the random numbers are stored in a table in intervals of time s 0.8 ("iterations")
    4. at any time, the (blue Subvi) code needs to have access to the random numbers generated in 'the previous iteration.

    To clarify, the iterations are as follows:
    Iteration #1: 0 - 1.8 s
    Iteration #2: 2 - 2. 8 s
    Iteration #3: 3 - 3.8 s

    Iteration #4: 4 - 4.8 s
    ..
    And so on...

    So for each iteration: the blue (Subvi) needs to have access to the random numbers generated in the previous iteration, for example:

    Iteration #1 (0 - 1.8 s): The blue (Subvi) Gets an array that contains only the zero (random numbers are recorded for the first time)
    Iteration #2 (2s - 2 8 s): The code gets an array containing random numbers of iteration #1
    Iteration #3 (3 s - s 3.8): the code gets an array containing random numbers of iteration #2
    Iteration #4 (3 s - s 3.8): the code gets an array containing random numbers of iteration #3
    ..
    And so on...

    At any given time in time;
    -The code gets an array that contains all the random, recorded during the previous iteration numbers
    -Values since before her previous iteration are ignored and not stored anywhere

    Thus, for example, to the #7 iteration:

    -The values during the iteration #6 are made available to the code in the form of a table

    -Values of #1 to #5 iterations have been deleted and not stored anywhere

    It is important that all values since before recording the previous iteration are deleted because they are not necessary because VI actaual will work for a long period of storage of numbers a lot more than I have indicated here

    Screenshot of the skeleton VI:

    I tried to play with the paintings, the structures of the case and the registers at offset, but everytime I try I get something wrong

    The skeleton VI is also attached (Iteration_VI and Code_SubVI)

    Any suggestions?

    Thank you!

    Yes, I agree that you need help.  First of all, you really do need to learn more about LabVIEW - spend a few hours with the tutorials, such as those mentioned on the first page of the Forums.  Oops - links to the tutorials which had been present for years seem to have been moved "elsewhere" with August 2016 LabVIEW community reorganization.  But look for them...

    Here are a few screws that basically implement what I described above (with some minor modifications).  First of all, this is a Top level VI which runs at 5 Hz (200 msec waits).  It starts with an array of 5 elements of 0, then once per second, this is replaced by a table of random numbers generated by the Random 5-table sub - VI 5 elements.  Note that I do not use a loop timed - those who are really designed for LabVIEW RT, but use the simplest functions on the Palette of the timer.

    Can't you see how that works?  The array to initialize on the left begins you with a table of 5 elements of 0.  The Timer inside the loop, it runs at 5 Hz, 'Index' counts 1, 2, 3,... to tell you where you are, and 5 shows you everything that lives on the shift register.

    Now sub - VI Random 5-table is supposed to do the following - if she was called to 5, 10, 15,..., it must return a (new) array of 5 random numbers, otherwise, it must return the array that was passed in.  So if all "works", table 5 shows 0, 0, 0, 0, 0 for the first second, a table at random for the second second (which is not superfluous!), a different for the third random picture second and so on.  I have already said a way to build this, but I chose a slightly different method (equivalent).

    Whenever it is called, a new random element is generated and added at the end of a (growing) random table stored in the shift register.  If size become 5, we send this Random-table-of-5 out through Out table and reset the register shift to an empty array.

    The case by default (when the size is not equal to 5) is shown below - we just return the array of entry to and accumulate new random table in full growth.

    These code fragments extracted from VI.  If you have LabVIEW 2016 (see the "2016" at the top right of the image?  This shows that it is a snippet of code LabVIEW 2016), you can open a blank diagram and drag this image, where magic OR converts it to a VI.  Otherwise, the code yourself and try out it.

    Caution - it is designed to run once.  If you run the program of high level, a second time, you may find that the new Random 5 - table appears to 0.4 ", 1.4", 2.4"(instead of 1", 2 ", 3").  I leave as an exercise for understand you to (a) why he is and (b) fix the code.  If you can't do that, then move an another 3-4 hours with the LabVIEW tutorials (or start playing with this code, edit it in some small way and to understand how it works).

    Bob Schor

  • Any external device to record and store the video?

    I need an external device (card reader, USB dongle, no matter) allows me to directly record and store video on this subject. My iPhone is already full, so I can't use something like an ordinary lightning flash drive, because he always would force me to record videos in my iPhone and then move it from there.

    Any ideas?

    An external device that can record and store video? Look like a video camera for me.

Maybe you are looking for

  • Satellite L100-179: 2-3 weeks after recovering sound interruptions and performance drop down

    I bought a new L100-179 for my daughter for school. It worked fine out of the box, but after 2 weeks, he was so full of adware (from kazaa) that spybot/adaware teacher could not clean everything off. He could not play sound properly windows sounds or

  • TOSHIBA fan control program?

    Hello world! (ME again!) Any of you know what TOSHIBA Fan Control program it is? Thank you!Suddste223

  • synchronize the Windows in my Iphone calendar

    I have a calendar on Windows Calendar I want to sync my iphone calendar.  How do I do that?

  • Can not post for sale

    I received an e-mail from blackberry so far:«"Research In Motion is pleased to inform you"1.0.0.1 version "of your product"The hanged man"was approved.»but I nai privilege aps submit for sale in Lun, interface... How to do?

  • can I use rapc.exe in my product?

    Can I use rapc.exe and net_rim_api.jar in my product to convert cod midlet? I hava a commercial product. And I want to support Blackberry program. Can I use api RIM and the environment? Is there a license number?