retrieve value from XML

Hello
I have an XML doc string stored in a varchar2 column, I want to use Oracle's XML functionality to the query string after the converted to an XMLTYPE.

I tried to convert and questioning, but it was in vain.

Please give me ideas or links to

1 convert an xml stored in VARCHAR2 to XML doc.
2. tell me the API for questioning against the created XML doc.

Kind regards
Kone

We can give you ideas without a version number (3 digits).

We can not tell you why what you were doing was not working if you don't show it to us.

Start there.

Tags: Database

Similar Questions

  • Retrieving values from XML in Oracle 9i - part II

    Hello

    regarding my previous post retrieving values of XML in Oracle 9i , I now have a different requirement.

    Assuming that the XML is as follows:

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

    " < GenericRequest xmlns =" http://webservices.mysite.com/test "xmlns:ns =" " http://webservices.mysite.com/test/NS "xmlns:ns1 =" " http://webservices.mysite.com/test/ns1 "xmlns:ns2 =" " http://webservices.mysite.com/test/ns2 ">

    < ns1:order >

    < ns1:orderItems >

    < ns1:orderItem >

    create < ns1:operation > < / ns1:operation >

    < ns1:brickId > TST002 < / ns1:brickId >

    < ns1:brickAttributes >

    < ns1:attribute >

    < ns2:name > COUNTRY < / ns2:name >

    < ns2: value > U.S. < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CUST_ID < / ns2:name >

    < ns2: value > 12345 < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CITY < / ns2:name >

    < ns2: value > New York < / ns2: value >

    < / ns1:attribute >

    < / ns1:brickAttributes >

    < / ns1:orderItem >

    < ns1:orderItem >

    Update < ns1:operation > < / ns1:operation >

    < ns1:brickId > TST001 < / ns1:brickId >

    < ns1:brickAttributes >

    < ns1:attribute >

    < ns2:name > COUNTRY < / ns2:name >

    < ns2: value > U.S. < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CUST_ID < / ns2:name >

    < ns2: value > 22222 < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CITY < / ns2:name >

    < ns2: value > Los Angeles < / ns2: value >

    < / ns1:attribute >

    < / ns1:brickAttributes >

    < / ns1:orderItem >

    < / ns1:orderItems >

    < / ns1:order >

    < / GenericRequest >

    As you can now see the XML contains several elements of the order. For each agenda item, I have a single operation and a brick_id. Then, for each item on the agenda, I have a list of brickAttributes (name and value).

    How can I get something like that?

    OPERATION BRICK_ID NAME VALUE

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

    create TST002 COUNTRY WE

    create TST002 CUST_ID 12345

    create TST002 New York CITY

    update of TST001 COUNTRY United States

    Update TST001 CUST_ID 22222

    Update TST001 CITY Los Angeles

    Version of database is 9.2.0.8

    SELECT * FROM version of v$.

    BANNER

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

    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production

    PL/SQL Release 9.2.0.8.0 - Production

    CORE Production 9.2.0.8.0

    AMT for HP - UX: 9.2.0.8.0 - Production Version

    NLSRTL Version 9.2.0.8.0 - Production

    Kind regards.

    Alberto

    Response of Odie, result is that extend

    with sample_data as (
    select xmltype(
    '
    
              
                
                  
                    create
                    TST002
                    
                      
                        COUNTRY
                        US
                      
                      
                        CUST_ID
                        12345
                      
                      
                        CITY
                        New York
                      
                    
                  
                  
                    update
                    TST001
                    
                      
                        COUNTRY
                        US
                      
                      
                        CUST_ID
                        22222
                      
                      
                        CITY
                        Los Angeles
                      
                    
                  
                
              
    ') xmldoc
    from dual
    )
    select extractvalue(value(x), 'ns1:orderItem/ns1:operation', 'xmlns:ns1="http://webservices.mysite.com/test/ns1"') as operation
         , extractvalue(value(x), 'ns1:orderItem/ns1:brickId', 'xmlns:ns1="http://webservices.mysite.com/test/ns1"') as brick_id
         , extractvalue(value(y), 'ns1:attribute/ns2:name', 'xmlns:ns1="http://webservices.mysite.com/test/ns1", xmlns:ns2="http://webservices.mysite.com/test/ns2"') as name
         , extractvalue(value(y), 'ns1:attribute/ns2:value', 'xmlns:ns1="http://webservices.mysite.com/test/ns1", xmlns:ns2="http://webservices.mysite.com/test/ns2"') as value
    from sample_data t
       , table(
           xmlsequence(
             extract(
               t.xmldoc
             , '/GenericRequest/ns1:order/ns1:orderItems/ns1:orderItem'
             , 'xmlns="http://webservices.mysite.com/test", xmlns:ns1="http://webservices.mysite.com/test/ns1"'
             )
           )
         ) x
       , table(
           xmlsequence(
             extract(
               value(x)
             , 'ns1:orderItem/ns1:brickAttributes/ns1:attribute'
             , 'xmlns:ns1="http://webservices.mysite.com/test/ns1"'
             )
           )
         ) y
    ;
    

    As shown, it simply retrieves to a higher level object that repeats once in table x and happening at the table there, which returns the expandable nodes.  The join is managed by value (x) in the second simple table.  It assumes that there is always 1 or several nodes of ns1:attribute in each ns1:orderItem.

  • Retrieving values from XML in Oracle 9i

    Hello

    I have the following XML:

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

    " < GenericRequest xmlns =" http://webservices.mysite.com/test "xmlns:ns =" " http://webservices.mysite.com/test "xmlns:ns1 =" " http://webservices.mysite.com/test "xmlns:ns2 =" " http://webservices.mysite.com/test ">

    < ns1:order >

    < ns1:orderItems >

    < ns1:orderItem >

    create < ns1:operation > < / ns1:operation >

    < ns1:brickId > TST123 < / ns1:brickId >

    < ns1:brickAttributes >

    < ns1:attribute >

    < ns2:name > COUNTRY < / ns2:name >

    < ns2: value > U.S. < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CUST_ID < / ns2:name >

    < ns2: value > 12345 < / ns2: value >

    < / ns1:attribute >

    < ns1:attribute >

    < ns2:name > CITY < / ns2:name >

    < ns2: value > New York < / ns2: value >

    < / ns1:attribute >

    < / ns1:brickAttributes >

    < / ns1:orderItem >

    < / ns1:orderItems >

    < / ns1:order >

    < / GenericRequest >

    And I use an older version of Oracle (it's something I can't change unfortunately):

    SELECT * FROM version of v$.

    BANNER

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

    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production

    PL/SQL Release 9.2.0.8.0 - Production
    CORE Production 9.2.0.8.0
    AMT for HP - UX: 9.2.0.8.0 - Production Version
    NLSRTL Version 9.2.0.8.0 - Production

    What is the best way to get the list name / value in a format like this with a SQL query?

    VALUE NAME

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

    COUNTRIES WE

    CUST_ID 12345

    New York CITY

    Kind regards.

    Alberto

    Hello Alberto,.

    You can do it like this:

    with sample_data as)

    Select xmltype)

    '

    "http://WebServices.mysite.com/test" xmlns:ns ="http://webservices.mysite.com/test" xmlns:ns1 ="http://webservices.mysite.com/test" xmlns:ns2 = "http://webservices.mysite.com/test" >. "

    create

    TST123

    COUNTRY

    WE

    CUST_ID

    12345

    CITY

    New York City

    xmlDoc ')

    of the double

    )

    Select extractvalue (value (x), ' / ns1:attribute / ns2:name ',' xmlns:ns1 is "http://webservices.mysite.com/test", xmlns:ns2 ="http://webservices.mysite.com/test" "" ") as the name

    ExtractValue (value (x), ' / ns1:attribute / ns2: value ',' xmlns:ns1 = "http://webservices.mysite.com/test", xmlns:ns2 ="http://webservices.mysite.com/test" "" ") as the value

    of sample_data t

    table)

    xmlsequence)

    extract)

    t.xmlDoc

    , ' / GenericRequest / ns1:order / ns1:orderItems / ns1:orderItem / ns1:brickAttributes / ns1:attribute'

    ", ' xmlns ="http://webservices.mysite.com/test", xmlns:ns1 ="http://webservices.mysite.com/test"". "

    )

    )

    ) x

    ;

    Namespace URI appear to be the same in your example of XML, if this is really the case, you can simplify the query and use the same namespace by default in any of the query.

  • Retrieving values from XML

    Hi all
    I don't know how to extract the POLICY of XML value which is 25000.
    Here's what I got tired.

    SELECT extractvalue (COLUMN_VALUE, ' / Member/MemberId ') MemberID,.
    ExtractValue (' COLUMN_VALUE, ' / Member/membership/MembershipKey/Key / * ') PolicyID
    TABLE (XMLSequence (xmltype (')))
    < member >
    MRD000200 < MemberId > < / MemberId >
    < 00 > BenefitRecordId < / BenefitRecordId >
    < membership >
    < MembershipKey >
    < issuer > CBA < / transmitter >
    < key name = "ABC_DIVISIONS" Id = "A_5" / >
    < / MembershipKey >
    < MembershipKey >
    < issuer > CBA < / transmitter >
    < key name = 'POLICY' Id = "25000" / >
    < / MembershipKey >
    < MembershipKey >
    < issuer > CBA < / transmitter >
    < key name = "SECTION" Id = "E22" / >
    < / MembershipKey >
    < / membership >
    < / member >
    '
    () .extract ('/member')));

    I want the rest of output
    Member ID PolicyID SECTION
    MRD000200 25000 E22

    Please suggest.
    Thank you.

    One way is like this:

    SELECT extractvalue(COLUMN_VALUE, '/Member/MemberId') MemberID,
    extractvalue (COLUMN_VALUE, '/Member/Membership/MembershipKey/Key[@Name="POLICY"]/@Id') PolicyID,
    extractvalue (COLUMN_VALUE, '/Member/Membership/MembershipKey/Key[@Name="SECTION"]/@Id') SectionID
    FROM TABLE(XMLSequence(xmltype('
    
    MRD000200
    00
    
    
    ABC
    
    
    
    ABC
    
    
    
    ABC
    
    
    
    
    '
    ).extract('/Member')));
    
  • to retrieve data from xml data type

    Hello...
    I have a doubt in the oracle database... Here's how to retrieve data from xml data type?

    Like this...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select xmltype('
      2  
    3 4 toMonth5 5 ctTestPan1 6 costType2 7 toYear2012 8 fromMonth12 9 fromYear2011 10 11
    ') as xml from dual) 12 -- 13 -- end of sample XMLDATA, use below query on your own table etc. as required 14 -- 15 select x.* 16 from t 17 ,xmltable('/DETAILS/FIELDS_VALUES/FIELD' 18 passing t.xml 19 columns name varchar2(30) path './NAME' 20 ,val varchar2(10) path './VALUE' 21* ) x SQL> / NAME VAL ------------------------------ ---------- toMonth 5 ctTestPan 1 costType 2 toYear 2012 fromMonth 12 fromYear 2011 6 rows selected.
  • Retrieve data from xml file

    Hello

    Consider, having more xml file

    
        

    How can I retrieve the value of the key to lonlat "36.76,3.05."

    in my qml file, I had something like

    ...
            Page {
                id: ch_loc
                Container {
    
                    //background: Color.White
                    ListView {
                        dataModel: XmlDataModel {
                            source: "LonLat.xml"
                        }
                        listItemComponents: [
                            ListItemComponent {
                            }
                        ]
                        onTriggered: {
                            //qDebug(indexPath[3]);
                            app.initiateRequest(dataModel.data(indexPath[0]))
                        }
                    }
                }
            }
    ...
    

    I'm on the right track? Need help please.

    Thank you, best regards.

    Maddin

    Hello

    OK after some reading, I thought about it.

    What I did:

    Page {
                id: ch_loc
                Container {
    
                    //background: Color.White
                    ListView {
                        dataModel: XmlDataModel {
                            source: "LonLat.xml"
                        }
                        listItemComponents: [
                            ListItemComponent {
                            }
                        ]
                        onTriggered: {
                            var selectedItem = dataModel.data(indexPath);
                            app.initiateRequest(selectedItem.value);
                        }
                    }
                }
            }
    

    Please don't quite understand. IAM does not ask for help without doing anything by myself. IAM at this new and iam from difficult to understand the whole material. For now iam happy that I understood this part.

    If this is done for me.

    Concerning

    Maddin

  • Retrieve data from xml to text-column

    I have a table that has a field (data type 'text') that contains an xml file. After some trial and error, I discovered that the only way to extract the full XML of this table is to use the ms sql "for XML" clause. But my problem is, that the column containing the xml file is called something like "XML_F52E2B61 - 18A 1 - 11 d 1-B105-00805F49916B" which is an identifier of invalids by CF.

    Is there a way to access this column by id instead of its name or what is the best way to access this topic?

    The SQL I use is:

    SELECT XmlPackage
    FROM LogK3OnChange
    WHERE DealerID = IsNull(<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.dealerid#">, DealerID)
    AND LogID = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.logid#">
    FOR XML RAW

    Kind regards

    Heiko

    I have it!

    If I use something like

    #myQuery ["XML_F52E2B61 - 18A 1 - 11 d 1-B105-00805F49916B"] [1] #.

    I can access the column without any problem

  • SQL statement to retrieve value from the attribute using XPATH

    Hi all

    I think this is the right place to post this request since it is related to oracle and xpath.

    I'm writing a sql statement of xpath that will extract the value of the column attribute is what type of clob data. Here is the xml example (xml_content is the column name)



    < RAFSCREEN >
    < Home >
    < clientnumber reference = "123123" >
    < / servant >
    < RAFSCREEN >



    I need to output query should return 123123.
    I'm using query

    Select extract (xmltype (xml_content), 'RAFSCREEN, Domestic, @clientnumber') as clientnumber from table_name

    It will be very useful if someone answer this question.
    Thank you

    It is Possible...

    10g> with form_content
      2  as
      3  (
      4  select 212 form_content_id , '    ' xml_content from dual union all
      5  select 222 , '    '   from dual union all
      6  select 223 , '    '   from dual union all
      7  select 224 , '    '   from dual )
      8  select form_content_id, extractValue(xmltype(xml_content),'/RAF/XBorderRAF/ReviewReferences/@clientLegalName') as clientnumber
      9  from form_content ;
    
    FORM_CONTENT_ID CLIENTNUMBER
    --------------- --------------------------------------------------------------------------------------------------------------------------------------------
    212      ABC123
    222      ZY123
    223      IN123
    224      NL123
    
    4 rows selected.
    

    Your request (you need)

    select form_content_id, extractValue(xmltype(xml_content),'/RAF/XBorderRAF/ReviewReferences/@clientLegalName') as clientnumber
    from form_content ;
    
  • How repeat/option output values from XML in the CLOB column?

    Environment:


    Oracle 11.2.0.3 EE on Solaris


    Very much a newbie XML but try.  :-)


    I have a table with the XML stored in a CLOB (no, I can't imagine the environment but I live here).


    I need to display the data in a flat file format.  Some of the data is both optional and possibly repeat if present.


    Here's a fun sample data:


    "< res: customers xmlns: res = ' http://www.whatever.com/response ">

    < res: lastName > SMITH < / res: lastName >

    < res: firstName > JENNIFER < / res: name >

    < res: Extras >

    < res: Extra >

    HOME < res: phoneType > < / res: phoneType >

    555-555-5555 < res: phoneNumber > < / res: phoneNumber >

    < / res: Extra >

    < res: Extra >

    < res: phoneType > MOBILE < / res: phoneType >

    666-666-6666 < res: phoneNumber > < / res: phoneNumber >

    < / res: Extra >

    < / res: Extras >

    < res: lastName > JONES < / res: name >

    < res: firstName > ROBERT < / res: name >

    < res: Extras >

    < res: Extra >

    HOME < res: phoneType > < / res: / phoneType >

    123-456-7890 < res: phoneNumber > < / res: phoneNumber >

    < / res: Extra >

    < / res: Extras >

    < res: lastName > MURPHY < / res: lastName >

    < res: firstName > SEAN < / res: name >

    < / res: customers >

    I'm trying to get my output to look like this:


    Last name first name model number

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

    JENNIFER SMITH 555-555-5555 HOME

    SMITH JENNIFER MOBILE 666-666-6666

    HOME OF ROBERT JONES 123-456-7890

    SEAN MURPHY


    I don't know how to get the repeated lines printed and I don't know how to get the printed line that does not contain the optional data.


    Here is the script that I have developed so far.  With my actual data I can get the printed name and I can get phone information printed out but only to the exclusion of the names. I was unable to get the data if the optional data is not present.


    I tried to refer to information from phone and then back up to 2 levels for the information of name but I receive: ORA-19110: no support for XQuery expression


    Select x.*

    client m.

    XMLTable (XMLNamespaces ('http://www.whatever.com/response' as "res") )

    , ' / res: clients/res: res/Extras: Extra '

    by the way of xmltype (m.CUSTOMER_XML)

    columns

    lastName varchar2 (80) WAY '... /... / res: LastName'

    , name varchar2 (30) WAY '... /... /FirstName'

    , varchar2 (30) phoneType PATH '.'

    , number of phone varchar2 (30) PATH '.'

    ) x

    Any help is greatly appreciated.


    -gary

    Hi Gary,.

    Are you sure the sample XML code correspond to your actual data?

    The second query expected error because the PATH expression refers to multiple targets.

    If it's really like that, the XML structure is not very easy to deal with. It would be wise to have a container element enclosing each customer information, like this:

    http://www.whatever.com/response">

    SMITH

    JENNIFER

    HOME

    555-555-5555.

    MOBILE

    666-666-6666.

    ...

    To answer your main question, you can use an OUTER JOIN to include data that do not have Extras.

    Using your original sample XML, something like this works for me:

    SQL > select x.lastName

    2, x.firstName

    3, y.phoneType

    4, y.phoneNumber

    client 5 m

    6, XMLTable)

    7 XMLNamespaces (default 'http://www.whatever.com/response')

    8, ' for $i in/clients/first name

    9 return element {} r

    $i 10 / following - sibling:Extras [1]

    11, $i/next - sibling:firstName [1]

    12          , $i

    13          }'

    14 passage xmltype (m.CUSTOMER_XML)

    15 columns

    lastName 16 varchar2 (80) PATH "lastName."

    17, firstName varchar2 (30) PATH "first name".

    18, extras xmltype PATH "Extras."

    (19) x

    20, XMLTable)

    21 XMLNamespaces (default 'http://www.whatever.com/response')

    22, ' / extras/Extra.

    23 passage x.extras

    24 columns

    VARCHAR2 (30) 25 phoneType PATH "phoneType".

    26, phoneNumber varchar2 (30) PATH "phone".

    27       ) (+) y

    28;

    LASTNAME FIRSTNAME PHONETYPE PHONENUMBER

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

    JENNIFER SMITH 555-555-5555 HOME

    SMITH JENNIFER MOBILE 666-666-6666

    HOME OF ROBERT JONES 123-456-7890

    SEAN MURPHY

  • Retrieving values from comma delimited string from PL/SQL procedure

    Gurus,

    I would spend that time but I'm crunched for time. I have a value of varchar2 parameter delimited by commas that will take X number of delimited values.

    Can you guys recommend a simple method to extract these values so that I can use this in explicit cursor?

    I give points to useful and correct responses.


    Thanks again,
    Scott


    BTW, I use Oracle 10 g and 11i applications

    Published by: sreese on January 31, 2012 15:37

    Hello

    Check out these pages:
    http://www.Oracle-base.com/articles/Misc/DynamicInLists.php
    http://tkyte.blogspot.com/2006/06/varying-in-lists.html

  • Passing values from a CO of a page in the xml file of a field with LOV.

    Hello

    I have 2 pages in this CUSTOMIZATION and the 2nd page got fields that have their turn to LOV.

    The query behind the LOV is sitting in the XML file and as an amendment to this motion, he needs some dynamic values

    I got to a stage where in the Commander of the 2nd page I set up values using getparameters.

    But how to pass this value from the 2nd page to the XML FILE.

    Thank you

    Regis

    Hi Regis

    Leave; s first focus on your first build errors. You said very well reconstruction work but compilation error comes when you run the page.

    It's strange. Can you please confirm if you have added the OFA libraries to your project. Ideally, they should be there once you create an OA project

    Concerning

    Marie Lise S

  • Load value one by one from xml as3

    Hi all

    I want to load value of xml.item.slika and use it to generate the link to the image

    XML file:

    <gallery>
       
    <item>
           
    <id>1</id>
           
    <strana>0</strana>
           
    <naslov>Lokacije</naslov>
           
    <aktuelno>1</aktuelno>
           
    <slika>1.jpg</slika>
       
    </item>
       
    <item>
           
    <id>2</id>
           
    <strana>2</strana>
           
    <naslov>Coaching</naslov>
           
    <aktuelno>1</aktuelno>
           
    <slika>2.jpg</slika>
       
    </item>
       
    <item>
           
    <id>3</id>
           
    <strana>0</strana>
           
    <naslov><![CDATA[O.Å . Bratstvo - panel]]></naslov>
           
    <aktuelno>0</aktuelno>
           
    <slika>3.jpg</slika>
       
    </item> 
    </gallery>

    Function:

    function ucitaneSlike(evt: Event): void {}
    var xml = new XML (evt.target.data);
    var slika:String = ";
    var loader: URLLoader = new URLLoader();
    for each (var xml... {point)
    Slika += item.slika;
    Loader.Load (new URLRequest (domen + ' podaci/igraci/slike/'+listaPodataka.lista.selectedItem["RB"]+ ' /' + slika + "?" + new Date () .getTime ()));

    centralniText.htmlText = ' < a href = "javascript:popUp(\''_+_domen_+'podaci/igraci/slike/'+listaPodataka.lista.selectedItem["RB"]+_'/'_+_slika_+_'\')" > < img src = "'+ domen +'podaci/igraci/slike/'+listaPodataka.lista.selectedItem["RB"]+" / "" + slika + ' "height ="50"width ="50"> < / has > ';"

    vScrollBar.update ();
    }


    }

    I get the result:

    localhost/podaci/igraci/slike/1/1.JPG2.JPG3.jpg

    Oh, if you want your textfield to display all links, use:

    kglad wrote:

    Use the following to get the good reference for each item slika.  If the rest of these urls are correct or not, I don't check:

    function ucitaneSlike(evt: Event): void {}
    var xml = new XML (evt.target.data);
    var slika:String = ";

     centralniText.htmlText = "";
    

    var loader: URLLoader = new URLLoader();
    for each (var xml... {point)
    Slika = item.slika;

    Loader.Load (new URLRequest (domen + ' podaci/igraci/slike/'+listaPodataka.lista.selectedItem["RB"]+ ' /' + slika + "?" + new Date () .getTime ()));

    centralniText.htmlText += '
    ';

    vScrollBar.update ();
    }

    }

  • Regd: In Coalesce retrieves values

    Hello

    Please someone explain me the script, below how it extracted, why we gave way and what substring can be found here.

    SELECT RECID, XMLRECORD,to_date(COALESCE(substr(extractvalue(XMLRECORD,'/row/cDEBIT.VALUE.DATE'),1,8),'19991231'),'YYYYMMDD ')

    Kind regards

    Alain

    It attempts to retrieve the value of cDEBIT.VALUE.DATE as a string from the XML, takes the first 8 characters of it (I suppose he wants just the date and not any component "hour").

    If there is not a date value that XML then COALESCE looks like use a NVL, and '19991231' value to substitute.

    Then the date resulting is converted to a DATE data type by using to_date with the appropriate size mask.

    PS EXTRACTVALUE is obsolete the XML features in newer versions of Oracle.

    Since 10g new features there to retrieve data XML using XMLTABLE or XQUERY functionality.

    If you post more details upon your request we show how it can be rewritten better get the values of the XML.

  • create the http client to retrieve data from web service

    Hello

    I am newbie on our webworks. I need to retrieve data from web service. How to connect to this service and analyzed. There is a tutorial that can help me get started with it.

    Can any one advice me how can I start working with webworks on blackberry 10

    Thanks for any help

    In general, you will need to use an AJAX call to the server

    It really depends on what the server returns as to how the information is easy to digest

    JQuery provides a simple interface, and returns information easy to use

    If you deal with things gets complicated XML according to namespace

    If you look at the raw XML data and it goes something like fred: name you will have questions requiring an implementation of SAX - JSON is simple if you don't get that even if (nothing too confusing here)

    If using an external data source JSON go if you have the choice

    As examples go - just look to the top of JQuery Ajax [JSON / XML] and you will get where you're going quickly

    SAX is MUCH harder because of the namespace - Dublin is the most common and same XML without namespace is not simple to handle, so avoid it if you can

  • Getting a value from selectonechoice

    Hello

    I use Jdeveloper 11.1.1.6

    My requirement is as below

    I have a component selected only one option, which displays a list of values.

    The user selects a value from the list of value and clicks the command button, and then the input field should be updated with the

    the value that is selected in the list.

    To do this, I wrote the code (no components company involved / only ADF faces) below

    I am able to get the list of values and post it on my page. For the rest of the game, I am not able to guess.

    I put selectoncechoice partialtriggers for buttons and the text in field

    All I need is the java code for getting the selected value and by attaching it to the text field.

    Can you help or guide me on this...

    Bean:

    The list < SelectItem > tempList.

    {} public void settempList (list < SelectItem > tempList)

    this.tempList = tempList;

    }

    public list < SelectItem > gettempList() {}

    If (tempList == null) {}

    tempList = new ArrayList < SelectItem > ();

    tempList.add (new SelectItem ("t1", "Item 1"));

    tempList.add (new SelectItem ("t2", "Item 2"));

    }

    Return tempList.

    }

    USER INTERFACE:

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

    " < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"xmlns:f =" " http://Java.Sun.com/JSF/core "

    ' xmlns:af = ' http://xmlns.Oracle.com/ADF/faces/rich "> "

    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

    < f: view >

    < af:document title = "listPage.jspx" id = "d1" > "

    < af:form id = "f1" >

    < af:panelGroupLayout id = "pgl1" layout = "vertical" halign = "center" >

    < af:spacer width = "10" height = "10" id = "s1" / >

    < af:selectOneChoice label = "Custom List" id = "soc1" contentStyle = "make weight:" BOLD "; color: Green; ">

    < f: selectItems value = "#{Valuesbean.tempList}" id = "si1" / > "

    < / af:selectOneChoice >

    < af:outputText value = "Output text" id = "ot1' partialTriggers ="soc1"/ >

    < af:commandButton text = "Change" id = "ot1' partialTriggers ="soc1"/ >

    < / af:panelGroupLayout >

    < / af:form >

    < / af:document >

    < / f: view >

    < / jsp:root >

    Hello

    If you see:

    You must set a value for the selectOneChoice component. You add a new variable in your beans to use it to store your selectedItem. Then your output text should also reference the same attribute in its value field.

    Try to add in your bean:

    String mySelection;

    public String getMySelection() {}

    return mySelection;

    }

    {} public void setMySelection (String, string)

    mySelection = string;

    }

    value = "#{ValuesBean.mySelection}" label = "Custom List" id = "soc1" contentStyle = "make weight:"BOLD"; color: Green; » >

    and value = "#{ValuesBean.mySelection}" id = "ot1' partialTriggers ="soc1"/ >"

Maybe you are looking for

  • device of too dark photo booth

    Photo booth is too dark.

  • What external webcam is the best for me to buy.

    I have a Mac Pro (mid-2012) running OX X El Capitan (Version 10.11.4) and and the monitor that I use is an Apple Cinema Display 32 ".  This monitor has not built in video/web camera and so I need to buy a.  In the past when I need of FaceTime video c

  • FFT with windows

    Hello. I really need a help. I have an excel data and then I use a FFT Real vi to get frequency data and wave spectra. Now, I want to use FFT windowed with the same data to excel, but was failed. FFT for real is a vector, while the entry for windowed

  • problem installing LV 7.1 student dir - ode.llb not reading

    I am new to LabVIEW and the installation of the edition above. Setup hangs at "trying to install OR advanced analysis 7.1. The message "error 1035: error reading the file: C:\Program NIUninstaller Instruments\LabVIEW 7.1\vi.lib\gmath\Ode.llb.» Check

  • Add a new user has produced two news users.

    I have a problem with Windows Explorer to crash. On one of the posts here, it was mentioned to set up a new user and see if the old user data are the issue. Well, I did and when I did set up the new user, I created, but also an additional user with t