How to retrieve data from XML

I have a scenario where I need to read data from database of xmltype (data type)
Table Structure :
Create table Ex_Tb (id number(30),emp_data XMLType );
I can save xml content in database,
Sample
insert into Ex_Tb values( 1, xmltype ('<?xml version="1.0" encoding="UTF-8" ?><userdata><uniqueid>54321</uniqueid><name>moorthi</name><age>25</age><city>Chennai</city></userdata>'));
Data inserted .
When retrieved from DB I see the data in the generated BO as given below:
<?xml version="1.0" encoding="UTF-8" ?>
<ExteOutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/pcbpel/adapter/db/Exte file:/C:/JDeveloper/mywork/Application1/Project1/xsd/Exte.xsd" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/Exte">
<ExteOutput>
<SDD_XML_REQ_DATA_GETCLOBVAL__><?xml version="1.0" encoding="UTF-8" ?><userdata><uniqueid>54321</uniqueid><name>moorthi</name><age>25</age><city>Chennai</city></userdata></SDD_XML_REQ_DATA_GETCLOBVAL__>
</ExteOutput>
</ExteOutputCollection>
My Question :
1. How to retrive values of individual tags contained within the embedded XML so that it can be mapped to a BO?
Basically I would like to map uniqueId, name,age,city from xml to a BO.
Rgds,
Krishna

Hi Krishna,
I'm not sure but are you selecting the data from the XMLType column as given in the section Using XMLType in an SQL Statement in the below doc?
http://docs.oracle.com/cd/B10500_01/appdev.920/a96620/xdb04cre.htm#1030582
Regards,
Neeraj Sehgal

Similar Messages

  • How to retrieve data from xml file into obiee reports

    Hi all,
    I've got a situation here. A xml file is stored as blob in oracle database table. Now i need to retrieve data/info from that xml file into obiee reports. How am i supposed to proceed with this ?

    I will go for a table function:
    http://gerardnico.com/wiki/database/oracle/table_function
    In two words, you can create a function that behave as a table. Then you create a function to pick up your xml, you parse it and you send back the rows.
    I know that Oracle has also a library for XML files but I never use it until now.
    Success
    Nico

  • How to retrieve data from catsdb table and convert into xml using BAPI

    How to retrieve data from catsdb table and convert into xml using BAPI
    Points will be rewarded,
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    This is not your requirment but u can try this :
    CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
    GRANT READ ON DIRECTORY text_file TO fah;
    GRANT WRITE ON DIRECTORY text_file TO fah;
    DROP TABLE load_a;
    CREATE TABLE load_a
    (a1 varchar2(20),
    a2 varchar2(200))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY text_file
    ACCESS PARAMETERS
    (FIELDS TERMINATED BY ','
    LOCATION ('data.txt')
    select * from load_a;
    CREATE TABLE A AS select * from load_a;
    SELECT * FROM A
    Regards
    Faheem Latif

  • How to retrieve value from xml file

    hi all,
    can somebody pls tell me how to retrieve value from xml file using SAXParser.
    I want to retrieve value of only one tag and have to perform some validation with that value.
    it's urgent .
    pls help me out
    thnx in adv.
    ritu

    hi shanu,
    the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
    pls have a look at the following code snippet.
    public class XMLValidator {
    static ArrayList strXXX = new ArrayList();
    public void validate(){
    factory.setValidating(true);
    parser = factory.newSAXParser();
    //all factory code is here only
    parser.parse(xmlURI, new XMLErrorHandler());     
    public void setXXX(String pstrXXX){          
    strUpn.add(pstrXXX);
    public ArrayList getXXX(){
    return strXXX;
    class XMLErrorHandler extends DefaultHandler {
    String tagName = "";
    String tagValue = "";
    String applicationRefNo = "";
    String XXXValue ="";
    String XXXNo = "";          
    XMLValidator objXmlValidator = new XMLValidator();
    public void startElement(String uri, String name, String qName, Attributes atts) {
    tagName = qName;
    public void characters(char ch[], int start, int length) {
    if ("Reference".equals(tagName)) {
    tagValue = new String(ch, start, length).trim();
    if (tagValue.length() > 0) {
    RefNo = new String(ch, start, length);
    if ("XXX".equals(tagName)) {
    XXXValue = new String(ch, start, length).trim();
    if (XXXValue.length() > 0) {
    XXXNo = new String(ch, start, length);
    public void endElement(String uri, String localName, String qName) throws SAXException {                    
    if(qName.equalsIgnoreCase("XXX")) {     
    objXmlValidator.setXXX(XXXNo);
    thnx & Regards,
    ritu

  • How to extract data from XML file with JavaScript

    HI All
    I am new to this group.
    Can anybody help me regarding XML.
    I want to know How to extract data from XML file with JavaScript.
    And also how to use API for XML
    regards
    Nagaraju

    This is a Java forum.
    JavaScript is something entirely different than Java, even though the names are similar.
    Try another website with forums about JavaScript.
    For example here: http://www.webdeveloper.com/forum/forumdisplay.php?s=&forumid=3

  • How to retrieve data from URL or querystring in bsp pages

    hi
    how to retrieve data from URL or querystring in bsp pages.
    thanks
    Edited by: Vijay Babu Dudla on Mar 23, 2009 7:35 AM

    Hello Friend,
    Vijay is correct.
    REQUEST is a system object available in runtime of BSP application.
    It is the object of interface IF_HTTP_REQUEST.
    Use methof REQUEST -> GET_FORM_DATA( )
    Regards
    Krishnendu

  • How to Retrieve data from Variant Table

    Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?

    Hello Mohan,
    if u already have data and u want to populate it in F4 help then use below code -
    u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
    REPORT  ZGILL_VALUE_REQUEST                     .
    data: begin of lt_all occurs 0.
            include structure DYNPREAD.
    data  end of lt_all.
    data: begin of lt_selected occurs 0.
           include structure DDSHRETVAL.
    data: end of lt_selected.
    DATA: BEGIN OF lt_code OCCURS 0,
                code LIKE zgill_main-PERNR,
          END OF lt_code.
    data no_dyn like sy-dynnr.
    Parameters : ECODE like zgill_main-PERNR.
    *parameters: pernr like pa0001-pernr .
    no_dyn =  sy-dynnr.   "give the scren no directly or sy-dynnr in case of report.
    At selection-screen on value-request for ECODE.
    select PERNR into table lt_code from zgill_main.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield               = 'ECODE'
            dynpprog               = sy-repid
           dynpnr                  = no_dyn
          dynprofield              =       'ECODE'
          window_title           = 'Employee Details'
           value_org              = 'S'
          DISPLAY                = 'F'
       TABLES
            value_tab             = lt_code
           RETURN_TAB             = lt_selected.
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *if sy-subrc eq '0' .
      write: 'success'.
    *endif.
    read   table lt_selected index sy-tabix.
    move lt_selected-fieldval to ECODE.

  • How to retrieve data from domain(Value Range)  of the table

    hi
    how to retrieve data from domain(Value Range)  of the table
    thanks

    Hello,
    You can try using the FM: DOMAIN_VALUE_GET TB_DOMAINVALUES_GET.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 24, 2009 10:08 AM

  • How to retrieve data from excel sheet

    Hi,
    How to retrieve data from excel sheet into a java file.

    janu05 wrote:
    If we append a $ in the end of the table name it is showing an error saying "invalid name,should not contain any invalid character or punctuation"Great, I'm very happy for you.
    Unless that was a question. In which case you might what to tell us a little more.
    Like which API you are using (assuming we are still on "reading an Excel sheet".

  • How to retrieve data from table(BOM_ITEM)

    Hi All,
    I wrote webservices using axis1.4 to get BOM information from SAP.. funtional module is CAD_DISPLAY_BOM_WITH_SUB_ITEMS
    webservices works fine..I'am able to retrieve data from Export Parameter..But not able to retrieve data from table
    How to retrieve data from table(BOM_ITEM)..?
    Cheers, all help would be greatly appreciated
    Vijay

    Hi,
    1. Create Page Process.
    2. Select Data Manipulation
    3. In category select "Automated Row Fetch"
    4. Specify process name, sequence, select "On Load - Before Header" in point.
    5. Specify owner, table, primary key, and the primary key column(Item name contains primary key).
    6. Create a process.
    7. In each item select "Database Column" in "Source Type".
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • How to retrieve data from MDM using java API

    hi experts
    Please explain me the step by step procedure
    how to retrieve data from MDM using java API
    and please tell me what are the
    important classes and packages in MDM Java API
    thanks
    ramu

    Hi Ramchandra,
    You can refer to following links
    MDM Java API-pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49
    webinr of java API
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/89243c32-0601-0010-559d-80d5b0884d67
    Following Fourm Threads will also help.
    Java API
    Java API
    Re: usage of  java API ,
    Matching Record
    Need Java API for Matching Record
    Thanks and Regards,
    Shruti.
    Edited by: Shruti Shah on Jul 16, 2008 12:35 PM

  • How to retrieve data from a web service

    Hi
    i am at very beginner level about web services.
    I am searching for a simple example of retrieving data from a web services, but cant find.
    How can i get xml data from a web service. i dont need to develop the web service it is already ready, i just need how could i fetch data from it.
    Can somebody point out or give an example?
    Thanks in advance

    Hi,
    just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
    Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
    In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
    Frank

  • How to retrieve data from inside the folders in SharePoint SSRS

    Hi ,
    How to get the data from inside the folders and subfolders.
    How can I do that.
    https://social.msdn.microsoft.com/Forums/en-US/15451351-4ee2-428c-a0b7-135810e4cbfa/action?threadDisplayName=ssrs-reports-sharepoint-list-datasource-how-to-retrieve-items-from-subfolders
    Here the information is not given.
    Regards
    Vinod

    Hi Vinodaggarwal87,
    According to your description, you want to retrieve data from sharepoint list in a sub folder. Right?
    In this scenario, we should select the XML data source type and in the connection string provide the
    List.asmx service URL when creating data source. Then we need to use the List web Service and specify "recursive" for ViewAttribute in Lists.asmx. For detail steps, please refer to the links below:
    Generate SSRS report on SharePoint List with folders using List Service.
    SSRS: how to specify ViewAttributes when creating a report against a SharePoint's list
    If you want to set the ViewAttribute on CAML query level. You need add the view tag outside of query tag:
    <View Scope="RecursiveAll">
        <Query>
            <Where>...</Where>
        </Query>
    </View>
    Reference:
    View Element (List)
    ViewAttributes Recursive Scope not working SharePoint 2013 CAML Query to fetch all files from document library recursively
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to retrieve data from a jsp page

    I have created a page with some text boxes, file, submit button. In my Ist jsp, i am dynamically add Text boxes and File (for Uploading).
    In the 2nd jsp, i am used Jakarata FileUpload API. I am able to retrieve all data and files except that value of dynamicall added text boxes. That is, I cannot retrieve data from dynamically added text boxes.
    Using Jakarata FileUpload API, i can retrieve values of form data using
    getString() method.
    I want to know that there is any way or method for retrieving form data values into String Array.
    regards
    madhu
    [email protected]

    Use parseRequest(request) to get the file information as you already are doing. However, I dont know how you can use request.getParameter("textField1") to get the other fields from the page. My work-around is as follows:
    Change your submit button to an ordinary button and add an onClick event to it. Then in the javascript function that supports the onClick, add the textField1 as follows:
    <form name="fileUploadForm" method="post" action="someAction" (((more code code here)))))
    function submitButtonClick(){
    document.fileUploadForm.action=
    document.fileUploadForm.action+
    "?textField1="+document.fileUploadForm.textField1.value"+
    "&textField2="+document.fileUploadForm.textField2.value"+
    "&textField3="+document.fileUploadForm.textField3.value";
    document.fileUploadForm.submit();
    As you can see in the above code, I append the textField1 name/value pair to the end of the action. Now in the server, you can use getParameter("textField1");

  • How to retrieve data from a read-only Excel file

    Hi Developers,
    I'm trying to retrieve data from a read-only Excel file. I used the same code that I used to retrieve data from a normal Excel file, but it can't work.
    My code is as followed:
    try
    InputStream KpExcel = new FileInputStream("kp.xls");
    HSSFWorkbook Kpwb = new HSSFWorkbook(KpExcel);
    HSSFSheet Kpsheet = Kpwb.getSheetAt(0);
    catch(Exception e)
    e.printStackTrace();
    System.out.println("Exception: "+e.getMessage());
    The error I received is as followed:
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
    at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:210)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
    at photoproductionsystem.IncomingWIPPanel.getKp(IncomingWIPPanel.java:118)
    at photoproductionsystem.IncomingWIPPanel.<init>(IncomingWIPPanel.java:76)
    at photoproductionsystem.TabbedDisplay.<init>(TabbedDisplay.java:47)
    at photoproductionsystem.Display.create(Display.java:73)
    at photoproductionsystem.Display.init(Display.java:44)
    at photoproductionsystem.Display.main(Display.java:229)
    Caused by: java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
    at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
    at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
    at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
    at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
    at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
    ... 15 more
    Can someone please help me with my problem? Thanks a lot in advance!

    Madeline wrote:
    how do I ask at Apache mailing list?I wonder why it seems to be a strange idea to some people to look at the software vendor's site for product support. :p
    http://poi.apache.org/mailinglists.html

Maybe you are looking for