Problem transforming any XML data to a number of

Ask for help, I am trying to transform XML data into a number that I can use in formulations to animate. It is a simplified example of what I'm trying to do. I have successfully comes from the xml file info in the text on the stage. My problem is that I need to have value data imported to be a number so that I can do with her future calculations, such as adding two numbers together to create a new variable total. I have accumulated my brain reading on XML data, has spent several days trying obvious solutions without result, and yes I'm new on even though I tried many encoding options.

Thank you, Cindy j..

-IMPORT of ONE XML FILE "textimport.xml".

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

< mediansaleschart >

< figureone > 20 < / figureone >

< figuretwo > 10 < / figuretwo >

< / mediansaleschart >

-EDGE ANIMER CODING scene/creationComplete

$.ajax({)

type: 'GET ',.

URL: "textimport.xml",

data type: "xml."

success: {function (xml)}

textOne = $(xml).find('figureone').text ();

textOneTxt.html (textOne);

textTwo = $(xml).find('figuretwo').text ();

textTwoTxt.html (textTwo);

}

});

var textOneTxt = $(this.lookupSelector ("textOneTxt"));

var textTwoTxt = $(this.lookupSelector ("textTwoTxt"));

-EDGE ANIMER OF ELEMENTS ON THE STAGE, text elements

textOneTxt

textTwoTxt

To get the value of the xml node, you must use parseInt.

So for the total, I did something like this

myTotal = parseInt (figureone) + parseInt (figuretwo);

You should also make use of the last reference of research

Instead of

$(this.lookupSelector ("textOneTxt"));

Use this notation

sym.$("textOneTxt");

Here's an example - http://www.heathrowe.com/edge/xmlnum/

Download - http://www.heathrowe.com/edge/xmlnum/xmlnum.zip

Code on compositionReady.

var figureone, figuretwo, myTotal;
var outputField = sym.$("xmlOutput");
var messageString;

$.ajax({)

type: 'GET ',.
URL: "sampleoutput.xml",
data type: "xml."
success: {function (xml)}
figureone = $(xml).find('figureone').text ();
figuretwo = $(xml).find('figuretwo').text ();
myTotal = parseInt (figureone) + parseInt (figuretwo);
messageString = "Figure a single value is:" + figureone + "
"
Figure two value is: "+ figuretwo +".
"
The total value is: "+ myTotal;

outputField.html (messageString);
}
});

///////////////// End Code ////////////////////////

HTH

Darrell

Tags: Edge Animate

Similar Questions

  • Problem reading of xml data

    private var _xlimData:XML =

    " < = xmlns:fo fo:root ' http://www.w3.org/1999/XSL/Format "> "

    < fo:layout - master > predetermined schema < / fo:layout - master >

    < / fo:root >

    var fo:namespace = new Namespace (http://www.w3.org/1999/XSL/Format);

    public function readXlim():Sub

    {

    Alert.Show (_xlimData.. FO:layout - master);

    }

    I am unable to read the data because of the hyphen(-) in "implementing page-master. But by placing the preview is a must. Please solve my problem

    var fo:Namespace = new Namespace("http://www.w3.org/1999/XSL/Format");
    Alert.show(String(_xlimData.fo::["layout-master"]));
    

    Off topic: Please don't spammed my blog next time. If you are facing a problem, please post your questions here so that others can also learn from the example where they have encountered the same problem. Thank you.

  • Problems with the display of XML data

    I'm a bit new to Flash and have problems out XML data in Flash. Basically, when I saw publication, all data load XML file and displays very well. But when I actually publish the file and view in a browser, no data is displayed.

    Data from XML is happening in the areas of dynamic text (title, description, image).

    I use an absolute URL to retrieve the XML data, and I tried a lot of text integrated solutions, and nothing has worked. Here, any help would be greatly appreciated.

    I have attached the script action, but also a piece of the XML file I get the data.

    After going through each difficulty as possible, I could find, I managed to miss the information contained in the link below. This fixed my issue.

    http://www.Adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14213

  • Problem on obtaining XML form data

    While I get XML data if I use all symbols except when '&' it works fine. But for '&' it gives this error:

    No source available for 'SyncCondvarWait_r() to 0xb0d5bc76.

    When I use this under the tag, it works fine.

    
    

    When I use this under the tag, it is getting above error.

    
    

    If anyone has a solution for this problem so help me...

    Have you tried using: & ?

    for example:

    
    

    Martin

  • Pdf forms can always send the xml data (even if the pdf does not extend)?

    Hello

    My problem is the following. I have Acrobat Professional license, so I can create pdf forms.

    I added a shipment through the mail button to my form and sent to the end user, who had only the acrobat reader software. He was able to complete the form and send its data via the e-mail button, and I got an xml with the data file.

    Because I had not extended the document, I suppose it's always possible, so I can always receive the xml data in completed forms, I can't?

    Then also extended the professional Acrobat document (Tools-> enable usage rights in Adobe Reader), because I need the final customer, be able to save the form. Now, I just sent this document extended by mail (do not use the tool Distribuite form in Acrobat), the user has clicked the button and again once I received my xml.

    Now, I want to back my document to a maximum of 500 customers, I have no limitation?

    I quote acrobat licenze agreement:

    14.13.3 for any unique Document extended, you may only either (a) deploy this Document extended to an unlimited number of recipients unique but shall not extract information from more than five hundred 500 unique of this extensive Document instances or any representation of a paper copy of this Document extended with fields of form [...]

    Since the function I described before (the xml data emailing) is granted even if the document is not extended, I think that this limitation does not apply to me. Am I wrong?

    The limitation applies instead if I use the function 'Distribuite form' (forms-> Distribuite forms...) in acrobat professional. If I use this feature for distribuite the form, an email is automatically sent by acrobat (and not manually by me, as before) and pdf dataset is created. When the end customer cliks button, a pdf file (and not an xml) with the data are sent to me. If I double click on acrobat fills the dataset that was created with the data. It is the extraction of information to which the license relates?

    This is my conclusion: a pdf form can still send data xml by the player, and if I Express with acrobat, the end-user can also record. The only restriction is to distribute the form using "Distribuite form", but if I use it not I have no limitation on the number of times where ever I can get xml data.

    Can anyone confirm that my conclusion is just?

    Thank you very much

    Giuseppe Romeo

    You can try the link "contact us".

  • Loading XML data in ListView of C++ after extraction of http data

    I'm sorry did searh but could not find any refrence related to my problem
    I am trying to load the xml data returned from a web service HTTP Post QNetworkRequest and QNetworkReply in c ++.

    My XML that gets donwloaded is as

    
     http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/">
      
        tu7652
        F
        Marry
        Wijaya
      
      
        23
        F
        Marry
        Wijaya
      
    
    

    In My QML, it comes to the ListView can say SearchResult.qml

    ListView {
              objectName: "resultlist"
              dataModel: feedsdatamodel
              listItemComponents: [
                ListItemComponent {
                            type: "item"
                            PeopleListItem {
                                name: ListItemData.givenName + ", " + ListItemData.sn
                                role: ListItemData.ExtFunction
                                leftPaddingText: 40
                            }
                        }
               ]
            }
     attachedObjects: [
           // The data model that contains the content of a XML file
            GroupDataModel {
                id: feedsDataModel
                sortingKeys: [
                    "givenName"
                ]
                grouping: ItemGrouping.None
            }
        ]
    

    PeopleListItem.qml

    import bb.cascades 1.0
    
    Container {
        property alias name: titleLabel.text
        property alias role: functionLabel.text
        property alias leftPaddingText: textcontainer.leftPadding
    
        layout: StackLayout {
            orientation: LayoutOrientation.TopToBottom
        }
        preferredWidth: 768
        preferredHeight: 135
        Container {
    
            id: textcontainer
            topPadding: 10
    
            layout: StackLayout {
                orientation: LayoutOrientation.TopToBottom
            }
            Label {
    
                id: titleLabel
                textStyle.base: SystemDefaults.TextStyles.TitleText
                textStyle.color: Color.Black
            }
            Label {
                id: functionLabel
                textStyle.base: SystemDefaults.TextStyles.BodyText
                textStyle.color: Color.Gray
            }
        }
        Divider {
            verticalAlignment: VerticalAlignment.Bottom
        }
    }
    

    This is the function I'm using to display the QML it is called from main.qml and works correctly.

    void PeopleFinder::onSearchClicked() {
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\t" << "begin";
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\tfname:"
                << m_fname << "\tlname:" << m_lname;
    
        // Create a network access manager and connect a custom slot to its
        // finished signal
        mNetworkAccessManager = new QNetworkAccessManager(this);
    
        // create a data model with sorting keys for lastname and firstname
        Q_ASSERT(
                connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))));
    
        //Load the bew QML file of Search from here
        QmlDocument *qml = QmlDocument::create("asset:///SearchResults.qml").parent(
                this);
        qml->setContextProperty("peoplefinder", this);
    
        Page *mypage = qml->createRootObject();
        qml->setParent(mypage);
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\t s444444";
    
        // Retrieve the activity indicator from QML so that we can start
        // and stop it from C++
    //  mActivityIndicator = mypage->findChild("myIndicator");
    
        // Retrieve the list so we can set the data model on it once
        // we retrieve it
        mListView = mypage->findChild("resultlist");
    
        mNavigator->push(mypage);
    }
    

    Once the page loads in the QML it call the launch request providing c ++ file and once the
    query is completed under function is called with the data. I checked that data are downloaded properly

    void PeopleFinder::requestFinished(QNetworkReply* reply) {
        qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                << "response received";
        // Check the network reply for errors
        if (reply->error() == QNetworkReply::NoError) {
    
            // Open the file and print an error if the file cannot be opened
            qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                    << "No error";
    
            // Write to the file using the reply data and close the file
            QByteArray xml = reply->readAll();
            qDebug() << "Data: \n" << xml;
    
            // load the xml data
            XmlDataAccess xda;
            QVariant list = xda.load(xml, "ArrayOfPeople");
    
            qDebug() << "List:::\n" << list;
    
            GroupDataModel *datamodel = (GroupDataModel*)mListView->dataModel();
            // add the data to the model
            datamodel->clear();
            datamodel->insertList(list.value());
            datamodel->setSortingKeys(QStringList() << "givenName" << "sn");
            qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                    << "Datamodel set size:: " << datamodel->size();
    
            // Set the new data model on the list and stop the activity indicator
    
        } else {
            qDebug() << "\n Problem with the network";
            qDebug() << "\n" << reply->errorString();
        }
    }
    

    But now, the real problem begins as in how to convert QByteArray data type of QVariantList which can be loaded into the datamodel
    I don't want to write the data to the XML file and then pass that as a list his will is very slow, once I move test environment to the production environment.

    Please help me solve this problem

    I got it to work using xml parsing with QXmlStreamReader

  • 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.

  • 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.

  • Insert the ROWNUM in a column of data type of NUMBER table

    Hello

    I have a table that has a column named "rank" of the NUMBER data type. Basically, I want to make an analysis of top-n and insert the ROWNUM with other columns in the table.

    Definition of table1:

    CREATE TABLE

    (

    col1 VARCHAR2 (10),

    Col2 NUMBER,

    NUMBER of col3,

    rank NUMBER

    );

    INSERT INTO table1

    SELECT col1, col2, col3, rownum

    DE)

    SELECT col1, col2, col3

    FROM table2

    ORDER BY DESC of col3

    )

    WHERE rownum < = 5;

    I get an error ORA-01722: invalid number. I think the mistake is virtual ROWNUM is not data type of NUMBER, so I tried to cast as CAST (ROWNUM AS NUMBER), but it does not work, same error. Can can you please shed some light on how to convert a ROWNUM number or if the issue is something else.

    you're right, your example worked. It is an example of table I just created just to illustrate the problem, but my real table was always showing the same problem. Weird, isn't? However when I added the column names after that insert the question but statement I resolved. Adding code

    INSERT INTO TABLE1

    (col1, col2, col3, rank) - added

    SELECT col1, col2, col3, rownum

    DE)

    SELECT col1, col2, col3

    FROM table2

    ORDER BY DESC of col3

    )

    WHERE rownum<=>

    So that means ROWNUM returns number; and another confusion: why the inclusion of the column has solved my problem when it is not necessary for your example. in any case thank you.

  • extract xml data in the collection

    Hello

    I want to extract xml data in a collection of collection


    could any body you tell me if we succeed in sql
    ex:

    declare
    type t_code is table of number;
    type r_rec is record (c_name varchar2 (100),)
    c_code vrachar2 (100),
    c_code_number t_code);
    type t_rec is the table of the r_rec;

    l_xml xmltype: = xmltype (')

    < body >
    <>campaign
    < code > < code > CAMP_1
    < description > Campaign_1 < / description >
    < rateplans >
    < rateplanCode > 1 < / rateplanCode >
    < rateplanCode > 2 < / rateplanCode >
    < rateplanCode > 3 < / rateplanCode >
    < / rateplans >
    < / campaign >
    <>campaign
    < code > < code > CAMP_2
    < description > Campaign_2 < / description >
    < rateplans >
    < > 11 rateplanCode < / rateplanCode >
    < > 22 rateplanCode < / rateplanCode >
    < rateplanCode > 33 < / rateplanCode >
    < / rateplans >
    < / campaign >
    <>campaign
    < code > < code > CAMP_3
    < description > Campaign_3 < / description >
    < rateplans >
    < > 111 rateplanCode < / rateplanCode >
    < > 222 rateplanCode < / rateplanCode >
    < > 333 rateplanCode < / rateplanCode >
    < / rateplans >
    < / campaign >
    < result >
    < > 00 resultCode < / resultCode >
    < resultText > success < / resultText >
    < / result >
    (< / body > ');

    Start

    Select / * logic exrat value of xml in the final collection * /.
    Double;

    end;

    I want data in the model in my final collection t_rec

    CAMP_1, Campaign_1, nested_table (1,2,3)
    CAMP_2, Campaign_2, nested_table (11,22,33)
    CAMP_3, Campaign_3, nested_table (111,222,333)

    Published by: 948596 on May 17, 2013 05:17

    Like this

    SQL> declare
      2       type t_code is table of number ;
      3       type r_rec is record
      4       (
      5          c_name varchar2(100),
      6          c_code varchar2(100),
      7          c_code_number t_code
      8       );
      9       type t_rec is table of r_rec ;
     10       l_rec t_rec := t_rec();
     11       l_xml xmltype := xmltype
     12                        ('
     13                           
     14                           
     15                           CAMP_1
     16                           Campaign_1
     17                           
     18                           1
     19                           2
     20                           3
     21                           
     22                           
     23                           
     24                           CAMP_2
     25                           Campaign_2
     26                           
     27                           11
     28                           22
     29                           33
     30                           
     31                           
     32                           
     33                           CAMP_3
     34                           Campaign_3
     35                           
     36                           111
     37                           222
     38                           333
     39                           
     40                           
     41                           
     42                           00
     43                           Success
     44                           
     45                           '
     46                        ) ;
     47  begin
     48       for i in (
     49                 select rownum id
     50                      , t1.code
     51                      , t1.description
     52                      , t2.rate_plan_code
     53                      , row_number() over(partition by t1.code order by t2.rate_plan_code) rno
     54                   from xmltable
     55                        (
     56                             '/body/campaign' passing l_xml
     57                             columns
     58                               code        varchar2(100) path 'code',
     59                               description varchar2(100) path 'description',
     60                               rate_plans  xmltype       path 'rateplans'
     61                        ) t1
     62                      , xmltable
     63                        (
     64                             '/rateplans/rateplanCode' passing t1.rate_plans
     65                             columns
     66                               rate_plan_code varchar2(100) path '.'
     67                        ) t2
     68                )
     69       loop
     70            if i.rno = 1 then
     71               l_rec.extend;
     72               l_rec(l_rec.count).c_name := i.description;
     73               l_rec(l_rec.count).c_code := i.code;
     74               l_rec(l_rec.count).c_code_number := t_code();
     75            end if;
     76            l_rec(l_rec.count).c_code_number.extend;
     77            l_rec(l_rec.count).c_code_number(i.rno) := i.rate_plan_code;
     78       end loop;
     79       for i in 1..l_rec.count
     80       loop
     81          dbms_output.put_line(l_rec(i).c_code || '  ' || l_rec(i).c_name);
     82          for j in 1..l_rec(i).c_code_number.count
     83          loop
     84             dbms_output.put_line(l_rec(i).c_code_number(j));
     85          end loop;
     86       end loop;
     87  end;
     88  /
    CAMP_1  Campaign_1
    1
    2
    3
    CAMP_2  Campaign_2
    11
    22
    33
    CAMP_3  Campaign_3
    111
    222
    333
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • 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.

  • Error specifying the spry xml data source?

    I have been using Spry in Dreamweaver XML data sets without any problem until I added the YUI calendar widget. After that, I get a message error "no entity expected to name reference (65: 23). Also, there is no evidence in the bindings panel. I have a Mac OS X, which I find very frustrating after being on a PC for 15 years. I can never find anything that I am looking help section.

    Here's what I tried to present this has not worked.

    1 removed the YUI extension

    2. remove the * file *.dat in the folder of configuration in the user library folder

    3 Rename the configuration folder in the user library folder

    4 copy the folder of my laptop configuration library works

    5. uninstalled and reinstalled Dreamweaver CS4

    I can code everything by hand, but it of a lot of your time and makes the software a virtual paper weight.

    I would be recognizing an advisor who may be offered.

    Preference for programs files Mac is in your user folder/Library/Preferences account.  The files that DW and other applications create end in .plist.  These files are created by Mac OS for many applications.  If you delete one, the operating system will be re - create another preferences file the next time the application opened.

    Also other files DW records during a re - install are saved only if you go through the uninstall process and enable this option.  It's the same for the Windows version.  Sometimes if there are strange errors you can contact Adobe support for more information.

    If not and you need to do a reinstall, I would recommend disabling everything first.  Then, by running the adobe CS # own tool.  Just type this phrase into Google and you'll find the best result for CS3 or CS4.

    Adobe - Adobe CS3Clean Script

    Adobe - Adobe CS4 clean Script

    Those more that simply remove the program.  They will remove all the items in the applications folder and shared in the user's library and the library of the system.  It is the only true way to make a re-install AFAIK.  But you will need to disable the function before doing so because it will erase all files and all the serial numbers of all the Adobe programs with this tool.

  • [8i] problem of calculation of Date/time...

    So I am currently faced with a situation where I need to calculate the total number of hours that a workstation is in use for each day in a given period. I have a table with newspaper each time that each workstation is used. The problem is a workstation can be used for any period of time, commencing on any day and ending on any day. This means that a particular log entry may extend over several days. I don't know how to split the difference between the time of the end of an entry and departure date/time of entry over several days.

    Here is a sample table and some sample data for what I'm doing:
    -- Note: in reality, this table contains more columns
    CREATE TABLE     my_hrs
    (     record_id     NUMBER     NOT NULL
    ,     sdatetime     DATE     
    ,     edatetime     DATE     
    ,     workstation     VARCHAR2(4)
         CONSTRAINT my_hrs_pk PRIMARY KEY (record_id)
    );
    
    -- Note: sdatetime, edatetime, and workstation CAN all be NULL, though I won't provide
    -- any sample data for these situations since I want to ignore them in my results
    -- Additionally, there are hundreds of workstations, but I'm only using 2 to simplify the sample data
    
    INSERT INTO     my_hrs
    VALUES (12345,TO_DATE('03/01/2010 08:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 13:35','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (13427,TO_DATE('03/01/2010 08:10','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 10:02','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (21543,TO_DATE('03/01/2010 14:07','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 16:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (22412,TO_DATE('03/01/2010 10:15','mm/dd/yyyy HH24:MI'),TO_DATE('03/01/2010 15:30','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (11976,TO_DATE('03/01/2010 17:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/02/2010 02:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (34215,TO_DATE('03/01/2010 22:10','mm/dd/yyyy HH24:MI'),TO_DATE('03/02/2010 04:30','mm/dd/yyyy HH24:MI'),'321B');
    INSERT INTO     my_hrs
    VALUES (24789,TO_DATE('03/02/2010 13:00','mm/dd/yyyy HH24:MI'),TO_DATE('03/05/2010 02:30','mm/dd/yyyy HH24:MI'),'123A');
    INSERT INTO     my_hrs
    VALUES (31542,TO_DATE('03/02/2010 21:30','mm/dd/yyyy HH24:MI'),TO_DATE('03/04/2010 10:30','mm/dd/yyyy HH24:MI'),'321B');
    According to my data in the example above, these are the results I want to see:
    WORKSTATION     DATE          HRS_IN_USE
    ------------------------------------------
    123A          3/1/2010     14.96667
    321B          3/1/2010     8.95000
    123A          3/2/2010     13.50000
    321B          3/2/2010     7.00000
    123A          3/3/2010     24.00000
    321B          3/3/2010     24.00000
    123A          3/4/2010     24.00000
    321B          3/4/2010     10.50000
    123A          3/5/2010     2.50000
    321B          3/5/2010     0.00000
    Is this possible? (Please note that if the workstation was not used on a particular day, I want to show him 0 for this workstation for that day). Another thing to note is that I work with Oracle 8i.

    Thanks in advance for the help!

    Hello

    user11033437 wrote:
    Sorry, bind variables are DATEs.

    Where are you running that? I assumed it was SQL * Plus, where the bind variable can not be DATEs.
    That's exactly why I wanted a full test case.

    user11033437 wrote:
    The WHERE clause is the culprit here.

    SELECT  p.min_date  + ROWNUM - 1      AS a_date
    ,     p.min_date + ROWNUM         AS next_date
    FROM     all_objects
    ,     (     -- Begin in-line view p to define parameters
              SELECT      :start_date  AS min_date
              ,      :end_date  AS max_date
              FROM      dual
         ) p     -- End in-line view p to define parameters
    -- WHERE     ROWNUM <= p.max_date + 1 - p.min_date --this is causing the error
    

    Published by: user11033437 on March 12, 2010 09:02
    Replaced the post with something SPECIFIC

    Thanks, I appreciate it.
    A surprising number of people on this forum does not seem to see the value of posting something specific. It's a great relief to work with someone who does.

    I said how I could not simply subtract two dates, t1d - T2D, in a place determined; I had to use TO_NUMBER (t1d - T2D). Maybe even workaround will be used here.

    user11033437 wrote:
    When I run the subquery p by itself and add a line to avoid the sdatetime of edatetime and look at the results, it seems that he could return the difference between two days of a type of INTERVAL data, rather than a number...

    SELECT      :start_date  AS min_date
              ,      :end_date  AS max_date
              ,      :end_date - :start_date AS my_int
              FROM      dual
    

    I discovered that if in the end I have will be querying this database and another, however the other database is Oracle 8i, 9i is obviously...

    sigh of frustration

    It may seem reasonable (at the time your conclusion and your frustration): intervals have been introduced in Oracle 9. (However, I noticed that sometimes "what's new" were actually available, although without papers, in earlier versions).
    Yet once again, how are the bind varibales defined? Looks like they are the timestamps. Subtracting two DATEs results in a NUMBER, but by subtracting two stamps produced an INTERVAL. You can change to the DATEs where they are defined?
    Try to use TO_DATE or CAST in the subquery p, to ensure that it produces DATEs:

    ,     (     -- Begin in-line view p to define parameters
              SELECT      CAST (:start_date AS DATE)  AS min_date
              ,      CAST (:end_date   AS DATE)  AS max_date
              FROM      dual
         ) p     -- End in-line view p to define parameters
    

Maybe you are looking for

  • How can I know WHAT cookies in the list is the one I want to delete?

    OK, a desired, annoying cookie appears.I go to the list of cookies in the privacy section, but I can't IDENTIFY the NAME of the cookie that I want to delete.How do you know his name?

  • iPad mini 3 will not start after the os 9.2 update

    I just updated my ipad mini 3 iOS 9.3, after the download and installation now it does not start. just show a white screen with black apple logo.

  • iMovie event executives to rotate 180 degrees when skimming

    iMovie 9.0.9, mid-2010 iMac, El Capitan.  Many glitches with iMovie 9.0, especially after the download El Capitan, until I found a copy of 9.0.9 on backup, some problems solved, others remain.  When skimming of clips of the event, or in hover on a cl

  • Please can someone help me difficulty my Skype (severely Glitched)

    It started about 3 months, ago when I booted up my PC and checked my Skype to find that it was extremely buggy and graphically glitched. Nothing is in the right place. It seemed that it could be the work of a malware or a virus software any so I imme

  • Use sysprep for activation?

    My computer system has been implemented with an upgrade of Vistap after the initial installation of XP.I need to do a reformat, but want to be sure of the activation procedure with the upgrade installation.I was told to use the system preparation too