Read XML Values

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Mar 26 15:01:22 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
I am new to Oracle coming from MS-SQL for several years.
I have a stored procedure that receieves as parameter an XML string as Varchar2.
This is an example of the XML string
'<ROOT>
<Product UpdateType="U" ProductCode="928" Description="Product 928"/>
</ROOT>'
I need to read the value for UpdateType, ProductCode and Description into variables to do some manipulation and decide if I can update a record or not.
I do not need to store the XML string into a column in a table, pretty much I need to read the values see if the ProductCode exists in a table, if exists update it and if not create the record.
Thanks
MG

The tag has a child, called a TextNode. That's where your text is :)

Similar Messages

  • How to read XML Values using JAVA

    Hi FRNDS,
    I uploaded one XML File in imported Archieves, i have to read the value form XML uisng JAVA code,
    using XSL able to read  like  xsl variable name='TimeZone' select =$linkDoc//...........*
    But using java i have to read the value from XML,is it possible to read the value??
    please give me some sample code.
    regards,
    Raja Sekhar

    But using java i have to read the value from XML,is it possible to read the value??
    Check the below JAVA code from help:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
    you can ignore the XSLT part and configure only the JAVA code...check if this suits your needs.
    Regards,
    Abhishek.

  • Reading xml values in sql server..

    Hello All,
                    I have a stored procedure which returns an xml. Now, i am writing another database script using this SP.
    Now in my script, First i will execute the SP and i am getting the O/P as
    <root><person><id>168369</id><fullname>kishopre,ravi</fullname></person><person><id>168374</id><fullname>lasstname12,firstname12</fullname></person></root>
    and now i want to get all the id values, may be in some array ,  so that i need to run another query against all the id values
    ( say select * from P_PERSON where id = id value in xml )
    can any 1 please tell me how to grep all the id values in xml and run the query
    Thanks...

    Hello,
    You can use nodes and value methods of the xml data type to return set of IDs:
    select idTbl.XmlID.value('(./text())[1]', 'int') from @YourXmlDoc.nodes('/root/person/id') as idTbl(XmlID)
    MP.

  • Read bool value from xml

    Hi all :
    I try to read Boolean value from xml file , please see attach file , all the time this error rise
    I know that The XML tag describing the type of data does not match, how can I get Boolean value " 1" or "0 "
    Thanks
    wisam
    Attachments:
    untitled1.JPG ‏115 KB

    You are not trying to read boolean.. you are trying to read a DBL.
    To read a DBL you must first write a DBL to XML.
    To read a boolean replace the DBL with a boolean

  • How to read all values of a queue

    Hi All,
    In Message mapping I am checking condition for field value based on incoming value.
    In test cases i can see the second or third  occurence is getting supressed and first value fails the condition and mapping node not created.
    I would like to know how to read multiple values from queue and check condition for each value and if correct value present condition should pass.
    I tried all possible context changes but no luck.
    Any ideas how to read all values coming .
    Thanks.

    <?xml version="1.0" encoding="UTF-8"?>
    <msg version="" dbName="">
       <rowOp isLast="" cmitLSN="" cmitTime="" authID="" correlationID="" planName="">
          <updateRow subName="" srcOwner="" srcName="" intentSEQ="" rowNum="" hasLOBCols="">
             <col name="END_RSN_CDE" isKey="852369" invalidData="" rawData="">
                <smallint>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </smallint>
                <date>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </date>
                <char>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </char>
             </col>
             <col name="SVC_USER_SDT" isKey="789654" invalidData="" rawData="">
                <smallint>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </smallint>
                <date>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </date>
                <char>
                   <beforeVal invalidData="" rawData=""/>
                   <afterVal invalidData="" rawData=""/>
                </char>
             </col>
          </updateRow>
       </rowOp>
    </msg>

  • Its illegal to assign a XML value directly to the messageType variable

    I was recently working in JDeveloper 11g (11.1.1.7.0)  on an internal SOA project making some changes in the BPEL and noticed this message: Error(172): its illegal to assign a XML value directly to the messageType variable "InvokeFetchUpdatedUserId_FetchUpdatedUserID_InputVariable" I searched for this error message and didn't find anything.  The message is somewhat explanatory but I thought I would post the fix here just in case.  I modified my assign from the following:                                                                                                                           To this making sure to assign it to the underlying entity.                                                                                                                           Then it compiled just fine. Thanks, Tom

    In case if you are returning multiple value or with multiple columns then you have to use record or cursor to do that operation.
    satyaki>
    satyaki>ed
    Wrote file afiedt.buf
      1  declare
      2       cursor c1
      3       is
      4         select *
      5         from emp;
      6       r1 c1%rowtype;
      7     begin
      8       for r1 in c1
      9       loop
    10         dbms_output.put_line(r1.empno||' - '||r1.ename);
    11       end loop;
    12*   end;
    13  /
    7521 - WARD
    7654 - MARTIN
    7788 - SCOTT
    7839 - KING
    7844 - TURNER
    7876 - ADAMS
    7900 - JAMES
    7902 - FORD
    7934 - MILLER
    7566 - Smith
    7698 - Glen
    1 - boock
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:01.02
    satyaki>
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • Read XML file from presentation server

    Hi All,
    I want read XML file from presentation server currently i am using GUI_UPLOAD fm . but it is reading some junk data.
    DATA : BEGIN OF upl OCCURS 0,
              f(255) TYPE c,
           END OF upl.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename = D:\XX.XML'
          filetype = 'BIN'
        TABLES
          data_tab = upl.
    is there any other alternative.
    Thanks
    Swarup,

    Hi Swarup,
    Use method IMPORT_FROM_FILE of class CL_XML_DOCUMENT.
    A sample code snippet :-
    PARAMETERS: p_filnam TYPE localfile OBLIGATORY
    DEFAULT 'C:\Documents and Settings\ssaha\Desktop\test.xml'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filnam.
    DATA: l_v_fieldname TYPE dynfnam.
    l_v_fieldname = p_filnam.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    field_name = l_v_fieldname
    IMPORTING
    file_name = p_filnam.
    START-OF-SELECTION.
    TYPES:
    BEGIN OF ty_tab,
    name TYPE string,
    value TYPE string,
    END OF ty_tab.
    DATA:
    lcl_xml_doc TYPE REF TO cl_xml_document,
    v_subrc TYPE sysubrc,
    v_node TYPE REF TO if_ixml_node,
    v_child_node TYPE REF TO if_ixml_node,
    v_root TYPE REF TO if_ixml_node,
    v_iterator TYPE REF TO if_ixml_node_iterator,
    v_nodemap TYPE REF TO if_ixml_named_node_map,
    v_count TYPE i,
    v_index TYPE i,
    v_attr TYPE REF TO if_ixml_node,
    v_name TYPE string,
    v_prefix TYPE string,
    v_value TYPE string,
    v_char TYPE char2.
    DATA:
    itab TYPE STANDARD TABLE OF ty_tab,
    wa TYPE ty_tab.
    CREATE OBJECT lcl_xml_doc.
    CALL METHOD lcl_xml_doc->import_from_file
    EXPORTING
    filename = p_filnam
    RECEIVING
    retcode = v_subrc.
    CHECK v_subrc = 0.
    v_node = lcl_xml_doc->m_document.
    CHECK NOT v_node IS INITIAL.
    v_iterator = v_node->create_iterator( ).
    v_node = v_iterator->get_next( ).
    WHILE NOT v_node IS INITIAL.
    CASE v_node->get_type( ).
    WHEN if_ixml_node=>co_node_element.
    v_name = v_node->get_name( ).
    v_nodemap = v_node->get_attributes( ).
    IF NOT v_nodemap IS INITIAL
    * attributes
    v_count = v_nodemap->get_length( ).
    DO v_count TIMES.
    v_index = sy-index - 1.
    v_attr = v_nodemap->get_item( v_index ).
    v_name = v_attr->get_name( ).
    v_prefix = v_attr->get_namespace_prefix( ).
    v_value = v_attr->get_value( ).
    ENDDO.
    ENDIF.
    WHEN if_ixml_node=>co_node_text OR
    if_ixml_node=>co_node_cdata_section.
    * text node
    v_value = v_node->get_value( ).
    MOVE v_value TO v_char.
    IF v_char <> cl_abap_char_utilities=>cr_lf.
    wa-name = v_name.
    wa-value = v_value.
    APPEND wa TO itab.
    CLEAR wa.
    ENDIF.
    ENDCASE.
    * advance to next node
    v_node = v_iterator->get_next( ).
    ENDWHILE.
    LOOP AT itab INTO wa.
    ENDLOOP.
    Regards
    Abhii

  • Reading XML file using BAPI  I must use adapters .

    Reading XML file using BAPI and then uploading that xml file data into SAP using BDC.
    I cant take file on to my Application server I am getting the file dynamically from other file server and I need to use BAPis to read data from XML file.please tell me what should be my Import,Export and Tables parameterrs should be.
    Thanks

    Hi,
    Import, export and table parameters for BAPI is required, without that BAPI will not able to collect the data from XML. What you need to do is write a Zprogram and collect the data, store that data in internal table and call the BAPI by passing required parameters.
    Different Scanarios:
    1) Before calling a BAPI write some other program which collects the data from XML and create a UNIX file. Try to get the data from UNIX FILE
    2) If you see the XML tags, data will be in side that tags, try to get the data from XML tags and store that data in one SAP table. You can use the BAPI by fetching the data from table
    3)Create a table and store the data in the table. Use the table in SAP to extract the data.
    BAPI won't work without any parameters, you have to pass some parameters then the BAPI will return some values.
    Hope i am clear.
    Thanks&Regards,
    -Suresh Revuru

  • Reading XML Data from ABAP Program?

    Hi,
    How do I read XML Data from an ABAP Program? For example if I have the below basic XML Code-
    <xml>
    <Name> Thiru </Name>
    <Age> 24 </Age>
    <City> chennai </Chennai>
    </xml>
    How do i read the data within the Name,Age, and City tags into variables in the ABAP Program?
    Regards,
    Thiru

    if you decide to do in XSLT, I have a sample list here:
    XML file like this:
    <?xml version="1.0" encoding="UTF-16"?>
    <F>
    <P1>
    <t_1>value1</t_1>
    <t_2>testvalue</t_2>
    </P1>
    <P2>
    </P2>
    </F>
    XSLT file like this:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="F">
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <<b>DOCUMENT</b>>
    <xsl:apply-templates/>
    </<b>DOCUMENT</b>>
    </asx:values>
    </asx:abap>
    </xsl:template>
    <xsl:template match="P1">
    <ENTRY>
    <<b>T_1</b>><xsl:value-of select="t_1"/></T_1>
    <<b>T_2</b>><xsl:value-of select="t_2"/></T_2>
    </ENTRY>
    </xsl:template>
    </xsl:transform>
    ABAP program like this:
    DATA: BEGIN OF wa_upload,
    text(255) TYPE c,
    END OF wa_upload,
    itab_upload LIKE TABLE OF wa_upload,
    BEGIN OF wa_document,
    t_1 TYPE string,
    t_2 TYPE string,
    END OF wa_document,
    itab_document LIKE TABLE OF wa_document.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'XXXXX'
    filetype = 'ASC'
    TABLES
    data_tab = itab_upload.
    CALL TRANSFORMATION zrappel_xml_test
    SOURCE XML itab_upload
    RESULT <b>document</b> = itab_document.
    You should pay attention to the bold words.
    hope it will be helpful
    thanks

  • Reading XML file from UNIX

    I am reading XML file from unix using :
    FORM read_file USING p_name.
      DO.
        READ DATASET p_name INTO WXML_LINE LENGTH LENG.
      ENDDO.
    Then I am using subroutine below where I get a short dump at
      case X_NODE->get_type( ).
    FORM get_data tables   Y_CAPXML   structure GV_CAPXML
                  using value(x_node) type ref to if_ixml_node.
      data: INDENT      type i.
      data: PTEXT       type ref to if_ixml_text.
      data: STRING      type string.
      data: TEMP_STRING(100).
      case X_NODE->get_type( ).
        when if_ixml_node=>co_node_element.
          STRING = X_NODE->get_name( ).
          GV_NODETEXT = STRING.
        when if_ixml_node=>co_node_text.
          PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
          if PTEXT->ws_only( ) is initial.
            STRING = X_NODE->get_value( ).
            case GV_NODETEXT.
              when 'NIIN'.
                move STRING to GV_CAPXML-NIIN.
              when 'FED_x0020_STOCK_x0020_CLASS'.
                move STRING to GV_CAPXML-fed_stock_class.
              when 'DODIC'.
                move STRING to GV_CAPXML-dodic.
             endcase.
    The text for the short dump is : STACK_STATE_NO_ROLL_MEMORY
    Can someone please explain what is it mean.
    Thanks.

    May be this blog can help:
    <a href="/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach for Blog</a>
    Sri

  • How to Read Variable Values in WAD 7.0 Using JavaScript

    I found a how to: How to Read Variable Values in WAD 7.0 Using JavaScript on SDN.
    I get a Javascript error:
    bics.getElementsByTagName is not a function
    vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
    Thats my script:
    function currency()
    var varnm = "SFS_CP_CURR"; // Name of the variable to be read
    root = document.childNodes[0]; // <HTML>
    body = root.getElementsByTagName("BODY")[0]; // <BODY>
    xml = body.getElementsByTagName("XML")[0]; // <XML>
    bics = xml.childNodes[0]; // <BICS_VIEW>
    vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES>
    varl = vars.getElementsByTagName("VARIABLE"); // gives no. of variable in DP
    for ( i = 0; i <= varl.length; i++ ) // Loop one by one
    vari = vars.getElementsByTagName("VARIABLE")<i>;
    varnam = vari.attributes[0].text; // get variable name
    mem = vari.getElementsByTagName("MEMBER")[0];
    varval = mem.attributes.getNamedItem("name").value; // read variable value
    if (varnam == varnm) //check varname in loop needs to be read
    if (varval == "ZMON") // check for value1 and fire command1
    SFS_CP_M();
    if (varval == "ZKON") // check for value2 and fire command2
    SFS_CP_K();
    break;
    Where's the mistake?

    I'm afraid I haven't made my question understood clearly.
    What I am looking for is a method to get the value of variable inside excel (e.g. put it into a cell / range of a worksheet, so that we can reference it and use it as an input for planning function execution).
    Please advice.
    Thanks in advance,
    Shady

  • Getting error in Mozilla, reading xml using JavaScript

    Hi All,
    I am working with javascript with xml, getting error in Mozilla
    1. see html and xml file and check xml file path before test ---
    2. please, go through the html and xml file.
    read_xml.html
    =================
    <html>
    <head>
    <title>xml file using javascript</title>
    <script type="text/javascript">
    var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    //loading xml file
    function doLoadXML(xmlFile)
    xmlDoc.async="false";
    xmlDoc.onreadystatechange=doStateVerify;
    xmlDoc.load(xmlFile);
    rootData=xmlDoc.documentElement;
    function doStateVerify()
    if (xmlDoc.readyState != 4)
    return false;
    // reading xml file
    function doReadXML()
    alert("calling function");
    doLoadXML("C:/Documents and Settings/webdeveloper06/Desktop/for_test/comp-info.xml");
    alert("loading file...........");
    var dataArr=new Array();
    dataArr=xmlDoc.getElementsByTagName("comp-info");
    for(var m=0; m <= dataArr.length-1; m++)
              alert("entering inside looping here");
              document.write("<Table border='1px'><tr><td>");     
              document.write(dataArr[m].getElementsByTagName("name")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("description")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("web-addr")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("address")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("city")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("postal-code")[0].firstChild.nodeValue);
              document.write(dataArr[m].getElementsByTagName("country")[0].firstChild.nodeValue);
              document.write("</input></td></tr></table>");
    </script>
    </head>
    <body>
    <input type="button" value="Display XML Data" onClick="doReadXML()" />
    </body>
    </html>
    com-info.xml
    =========
    <?xml version="1.0" encoding="iso-8859-1"?>
    <itcopany>
    <comp-info>
    <name>xxx</name>
    <description>IT Reaserch Company</description>
    <web-addr>http://xxx.com</web-addr>
    <address>mehdipatnam</address>
    <city>Hyderabad</city>
    <postal-code>777888888</postal-code>
    <country>IN</country>
    </comp-info>
    <comp-info>
    <name>yyyyy </name>
    <description>Non IT Company</description>
    <web-addr>http://yyyy.com</web-addr>
    <address>xyxxyxyx</address>
    <city>Banglore</city>
    <postal-code>78878787878</postal-code>
    <country>IN</country>
    </comp-info>
    <comp-info>
    <name>zzzzzzz</name>
    <description>IT Company</description>
    <web-addr>http://zzzzzzz.com</web-addr>
    <address>secondrabad</address>
    <city>Hyderabad</city>
    <postal-code>9999999999999</postal-code>
    <country>IN</country>
    </comp-info>
    </itcopany>
    output status
    ============
    1. getting output in IE
    2. not getting output in Mozilla
    Can anyone Helpout, To get data in Mozilla
    regards,
    Abu

    Try to check this document Browser Support for SAP and use PAM (Product Availability Matrix) to check for the compatibility of your SAP system with the browser.
    If you are only the user of the Web Dynpro you would have probably no other choice than change the browser.

  • Read XML function - can't get it to work correctly to set metadata

    I've been working with the Read XML function in order to set metadata on assets with no avail. I'm using the following simple XML file in a Watcher folder with a poll watcher setup every 5 seconds, that then references a Read XML Response named "Update Asset Metadata" - to read the XML file and update the asset metadata. Nothing really happens even though the FCS Log file shows that the process is taking place to "update" the asset metadata. Any advice is appreciated. Thanks!
    FILE:
    <?xml version="1.0" encoding="UTF-8"?>
    <FinalCutServer>
    <request reqId="setMd" entityId="/asset/10">
    <params>
    <mdValue fieldName="Title" dataType="string">Text Info Change</mdValue>
    </params>
    </request>
    </FinalCutServer>

    I got the answer. You must type “*.xml” (that is, asterisk-dot-xml) in the Value field of Wildcard Include Filter for it to work correctly.

  • OESB File Adapter (Read .xml file to Write .xml)

    Hi All,
    The fileRead adapter of reading xml format file not writing the content to another xml file.
    In detail, I have a xml file of type (myschema.xsd) to pick using read operation will transform to output directory as xml format (pls find attachment as myschema1.xsd) is not writing the content in out xml file rather writing an empty elements. The same thing working with CSV to CSV.
    Has anybody come across the same? Also found out the same issue with BPEL file adapter as well.
    Any light on this will very much appreciated
    myschema.xsd
    +<?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org" targetNamespace="http://www.example.org/readFile" xmlns:ns1="http://www.example.org/readFile" elementFormDefault="qualified">
    <xsd:element name="Opportulity">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Customer" type="ns1:Customer" />
    <xsd:element name="Account" type="ns1:Account" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="Customer">
    <xsd:sequence>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Account">
    <xsd:sequence>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>+
    myschema1.xsd
    +<?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org" targetNamespace="http://www.example.org/writeFile" xmlns:ns1="http://www.example.org/writeFile" elementFormDefault="qualified">
    <xsd:element name="Customer">
    <xsd:complexType>
    <xsd:sequence>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>+
    Regards
    Venkata Madhu

    xslt
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="readFile.wsdl"/>
    <rootElement name="Opportulity" namespace="http://www.example.org/readFile"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="writeFile.wsdl"/>
    <rootElement name="Customer" namespace="http://www.example.org/writeFile"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 10.1.3.3.0(build 070615.0525) AT [TUE FEB 03 17:58:26 GMT+05:30 2009]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:ns0="http://www.w3.org/2001/XMLSchema"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/writeFile/"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:imp1="http://www.example.org/readFile"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:ns2="http://www.example.org/writeFile"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/readFile/"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
    exclude-result-prefixes="xsl plt pc ns0 jca imp1 tns hdr ns1 ns2 bpws ehdr hwf xp20 xref ora ids orcl">
    <xsl:template match="/">
    <ns2:Customer>
    <ns2:RoleType>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:RoleType"/>
    </ns2:RoleType>
    <ns2:FirstName>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:FirstName"/>
    </ns2:FirstName>
    <ns2:LastName>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:LastName"/>
    </ns2:LastName>
    <ns2:CustomerID>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:CustomerID"/>
    </ns2:CustomerID>
    <ns2:Nationality>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:Nationality"/>
    </ns2:Nationality>
    <ns2:Phone>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:Phone"/>
    </ns2:Phone>
    <ns2:EmailAddress>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:EmailAddress"/>
    </ns2:EmailAddress>
    <ns2:AddressLine1>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:AddressLine1"/>
    </ns2:AddressLine1>
    <ns2:AddressLine2>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:AddressLine2"/>
    </ns2:AddressLine2>
    <ns2:City>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:City"/>
    </ns2:City>
    <ns2:State>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:State"/>
    </ns2:State>
    <ns2:County>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:County"/>
    </ns2:County>
    <ns2:Postal>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:Postal"/>
    </ns2:Postal>
    <ns2:Country>
    <xsl:value-of select="/imp1:Opportulity/imp1:Customer/imp1:Country"/>
    </ns2:Country>
    </ns2:Customer>
    </xsl:template>
    </xsl:stylesheet>
    Venkata Madhu

  • Reading Xml file using File Adapter

    Hi
    I have added a file adapter to my process to read out a emp.xml from the location C:\inputDir.
    Also i have added transformation activity to map the variables.
    But the problem is iam not able read the values from emp.xml;File adpater giving me as
    empty values;
    Can someone show me a simple example?
    1.my input emp.xml
    <?xml version="1.0" encoding="windows-1252"?>
              <ns0:EmpCollection xmlns="http://TargetNamespace.com/ServiceName" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/Insert"/>
    <ns0:Emp>
    <ns0:empno>595</ns0:empno>
    <ns0:ename>TestDAY</ns0:ename>
    <ns0:job>ANALYST</ns0:job>
    <ns0:mgr>7369</ns0:mgr>
    <hiredate>2007-11-28</ns0:hiredate>
    <ns0:sal>20000</ns0:sal>
    <ns0:comm>120</ns0:comm>
    <ns0:deptno>20</ns0:deptno>
    </ns0:Emp>
    </ns0:EmpCollection>
    2.Getting output as following empty values
    [2007/01/12 10:20:49]
    Updated variable "InvokeWrite_Write_InputVariable"
    - <InvokeWrite_Write_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="EmpCollection">
    - <EmpCollection xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/Insert" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/Insert">
    - <ns0:Emp>
    <ns0:empno/>
    <ns0:ename/>
    <ns0:job/>
    <ns0:mgr/>
    <ns0:hiredate/>
    <ns0:sal/>
    <ns0:comm/>
    <ns0:deptno/>
    </ns0:Emp>
    </EmpCollection>
    </part>
    </InvokeWrite_Write_InputVariable
    Can someone show me a simple example?
    Thx in adv;
    ismail

    Thx for quick response;
    The following is the XML input for my BPEL process
    <?xml version="1.0" ?>
    <EmpCollection/>
    <Emp>
    <empno>595</empno>
    <ename>TestDAY</ename>
    <job>ANALYST</job>
    <mgr>7369</mgr>
    <hiredate>2007-11-28</hiredate>
    <sal>20000</sal>
    <comm>120</comm>
    <deptno>20</deptno>
    </Emp>
    </EmpCollection>
    The following is the XSd file for ReadAdpater schemafile
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/Select" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/Select" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="EmpCollection" type="EmpCollection"/>
    <xs:complexType name="EmpCollection">
    <xs:sequence>
    <xs:element name="Emp" type="Emp" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Emp">
    <xs:sequence>
    <xs:element name="empno" type="xs:int"/>
    <xs:element name="ename" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="job" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="9"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="mgr" type="xs:int" minOccurs="0" nillable="true"/>
    <xs:element name="hiredate" type="xs:dateTime" minOccurs="0" nillable="true"/>
    <xs:element name="sal" type="xs:decimal" minOccurs="0" nillable="true"/>
    <xs:element name="comm" type="xs:decimal" minOccurs="0" nillable="true"/>
    <xs:element name="deptno" type="xs:int" minOccurs="0" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="SelectSelect_enoInputParameters" type="SelectSelect_eno"/>
    <xs:complexType name="SelectSelect_eno">
    <xs:sequence>
    <xs:element name="eno" type="xs:int" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>

Maybe you are looking for

  • There is any Performance problem with Creation of many Y or Z  Programs.

    HI, There is any Performance problem with Creation of many Y or Z  Programs. plz give clarity regarding this to me...... regards ganesh

  • Font embedding in Flash CS5

    Hi, I have 3 swf files: Main, FontLibrary and Graphics. Main.swf loads the other two and applies logic. Graphics.swf is created in Flash CS5 and contains a dynamic TextField instance, to which I want to apply a font from FontLibrary.swf. To know whic

  • Modifying a web template

    Can anyone describe to me the way to find a web template file? I would like to modify one of the templates with this script <SCRIPT LANGUAGE="JavaScript"> var loginname = top.theApplication().GetProfileAttr("Login Name"); document.cookie = 'siebeluse

  • Passing parameter to transformation

    Hi there, I have a function. Let's say func(A Varchar2) returns varchar2. I have a variable whose value I get during the process flow. Let's call it myvar. I want to be able to be able to pass the following to func(A) - 'The new value is ' || ${myvar

  • Workflow for PO re- release

    Gurus, ply help in develpoing a workflow Po re-released means value changed from 10rs to 20 rs an alert to the manager how is this possible regards amey