Read XML data without name spaces from PL/SQL

Hi,
I am trying to upload XML data without namespaces into Oracle tables from PL/SQL. Below is the sample XML data.
Please let me know,How this is achievable in PL/SQL?
<?xml version="1.0" ?>
<insplist ver="2" count="1">
<insp id="219991" timestamp="134817078" stat="G" operator_id="999999" >
<data name="TIME CLOCK - PUNCH" val="INNER" type="STRING" />
</insp>
</insplist>
Thanks

And it's even simpler with the GET method as we just have to pass the url :
SQL> DECLARE
  2 
  3    v_url      varchar2(200) := 'http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=';
  4    v_address  varchar2(200) := '1 rue Victor Hugo Paris France';
  5 
  6    v_req      utl_http.req;
  7    v_rsp      utl_http.resp;
  8 
  9 
10 
11    v_xml      varchar2(32767);
12 
13    v_lng      number;
14    v_lat      number;
15 
16  BEGIN
17 
18    v_req := utl_http.begin_request(v_url || utl_url.escape(v_address), 'GET', utl_http.HTTP_VERSION_1_1);
19    v_rsp := utl_http.get_response(v_req);
20 
21    utl_http.read_text(v_rsp, v_xml);
22    utl_http.end_response(v_rsp);
23 
24    select longitude, latitude
25    into v_lng, v_lat
26    from xmltable(
27         '/GeocodeResponse/result/geometry/location'
28         passing xmlparse(document v_xml)
29         columns longitude number path 'lng'
30               , latitude  number path 'lat'
31         )
32    ;
33 
34    dbms_output.put_line('Longitude = ' || v_lng);
35    dbms_output.put_line('Latitude = ' || v_lat);
36 
37  END;
38  /
Longitude = 2.2734472
Latitude = 48.8282741
PL/SQL procedure successfully completed
Or, taking shorcuts :
SQL> select *
  2  from xmltable(
  3       '/GeocodeResponse/result/geometry/location'
  4       passing httpuritype('http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address='
  5                           || utl_url.escape('1 rue Victor Hugo Paris France')
  6                           ).getxml()
  7       columns longitude number path 'lng'
  8             , latitude  number path 'lat'
  9       )
10  ;
LONGITUDE   LATITUDE
2,2734472 48,8282741

Similar Messages

  • How can I read/write data files (text file) from PL/SQL Script

    I had an oracle forms pl/sql program to read/write a data file (text file). When this code is run on a command line as a PL/SQL script using the SQL*Plus I am getting an error:
    -- sample.sql
    DECLARE
      vLocation                 VARCHAR2(50)  := 'r:\';
      vFilename                 VARCHAR2(100) := 'sample.dat';
      vTio                   TEXT_IO.FILE_TYPE;
      vLinebuf               VARCHAR2(2000);
      vRownum               NUMBER        := 0;
      -- use array to store data FROM each line of the text file     
      TYPE           array_type IS VARRAY(15) OF VARCHAR2(100);
      vColumn      array_type := array_type('');
      PROCEDURE prc_open_file(p_filename IN VARCHAR, p_access IN VARCHAR2) is
      BEGIN
        vTio := TEXT_IO.FOPEN(vLocation||p_filename,p_access);
      EXCEPTION
        WHEN OTHERS then
          --  raise_application_error(-20000,'Unable to open '||p_filename);
          message(sqlerrm);pause;
      END;
      PROCEDURE prc_close_file is
      BEGIN
        IF TEXT_IO.IS_OPEN(vTio) then
           TEXT_IO.FCLOSE(vTio);
        END IF;
      END;
    BEGIN
      --extend AND initialize the array to 4 columns
      vColumn.EXTEND(4,1);
      prc_open_file(vFilename,'r');
      LOOP
          LTEXT_IO.GET_LINE(vTio,vLinebuf);
          vColumn(1)  := SUBSTR(vLineBuf, 1, 3);
          vColumn(2)  := SUBSTR(vLineBuf, 5, 8);
          vColumn(3)  := SUBSTR(vLineBuf,10,14);     
          Insert Into MySampleTable
          Values
            (vColumn(1), vColumn(2), vColumn(3));
          EXIT WHEN vLinebuf IS NULL;
       END LOOP;
       prc_close_file;
    END;
    SQL> @c:\myworkspace\sql\scripts\sample.sql;
    PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declaredIt works on the oracle forms but not on the SQL*Plus. Is there an alternative method using a PL/SQL script? A simple sample would help. Thanks.

    Did you ever noticed the search box at the right side of the forum?
    A quick search (limited to this years entries) brought up this thread for example
    Re: UTL_FILE Examples

  • 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

  • How to read XML data stored in CLOB in Concurrent prog Output

    Hi All,
    I'm trying to Generate the XML Data as concurrent Program output. I have a PL/SQL package which generated the XML data by using SQL/XML functions. I'm storing the generated XML data in a CLOB variable. But when i try to read the data using fnd_file.put_line(fnd_file.OUTPUT,XML_Data) it doesn't display data more than 32767 bytes.
    Please help me out to understand what could be done to read the data in chunks. I have tried many logic's to print chunks of data but the output tags are either chopped off and errors out saying Tag not found.
    My logic is as below:
    v_handler:= DBMS_XMLGEN.newContext(v_xml_query);
    --Sets NULL handling options
    DBMS_XMLGen.SetNullHandling(v_handler, dbms_xmlgen.EMPTY_TAG ) ;
    --Set special character handling
    DBMS_XMLGEN.setConvertSpecialChars(v_handler, TRUE);
    -- Specified whether to use an XML attribute to indicate NULLness of particular entity in the XML document
    DBMS_XMLGen.useNullAttributeIndicator(v_handler,TRUE);
    -- set Checking invalid chars
    DBMS_XMLGEN.setCheckInvalidChars(v_handler, TRUE);
    -- get the xml data as required
    v_xml_data:= DBMS_XMLGEN.getXMLtype(v_handler);
    SELECT XMLROOT(v_xml_data.extract('/*'),VERSION '1.0').getClobVal() into v_new_xml_Data from dual;
    -- get the length of the xml generated
    v_clob_len := dbms_lob.getlength(v_new_xml_Data);
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The Clob length is :'|| v_clob_len);
    -- logic to process string more than 32767 Processing by each character
    v_offset :=1;
    while (v_offset <= v_clob_len)
    LOOP
    v_char := dbms_lob.substr(v_new_xml_Data, 1, v_offset);
    IF (v_char = CHR(10))
    then
    fnd_file.new_line(fnd_file.output, 1);
    else
    fnd_file.put(fnd_file.output, v_char);
    end if;
    v_offset := v_offset + 1;
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The offset is :'|| v_offset);
    FND_FILE.NEW_LINE(FND_FILE.OUTPUT, 1);
    THe above logic is for character by character which is a performance burden? Please let me know if there is any other work around for this

    Hi,
    Thanks for Replying. I have refered http://blog.oraclecontractors.com/?p=69 and then i added that piece of code. Basically, i'm trying to generate a report using XML publisher. To generate the XML data i'm writing a pl/sql package with SQl/XML functions. DBMS_XMLGEN would help me convert the XML Data as is. When the concurrent program runs this XML data will merge with RTF layout and generate required report. I'm able to generate the Report for data less then 32767 bytes. More than the limit i need to pass chunks of XML data to read as output. That's the reason i'm using fnd_file.output. But it reads only 32767 size at a time.
    WHen i use the given logic, it works perfectly fine, but it loops for each character, for example if you have 30,000 characters it loops the same, which is peformance burden.
    So i tried to write the logic of chunks but still i get the error that XML tag is not found or missing. I'm hoping this is very common issue, but after all my trails, i didn't find the right solution.
    the other logic i tried was :
    v_new_xml_data varchar2(32767)
    v_iterations := CEIL(v_clob_len/v_chunk_length); -- v_chunk_length is 32767 and v_clob_length is length of the XML data stored inthe clob variable
    For i in 0..v_iterations
    LOOP
    FND_FILE.put_line (fnd_file.log,'the loops v_pos :'||i||' and v_clob_length :'||v_clob_len);
    v_new_xml_data := DBMS_LOB.SUBSTR ( V_XML_DATA,v_chunk_length,(i*v_chunk_length)+1);
    FND_FILE.PUT_LINE (FND_FILE.OUTPUT,v_new_xml_data); -- read the output for every 32767 chunks
    FND_FILE.PUT_LINE(FND_FILE.LOG, 'Chunk length is :'||((i*v_chunk_length)+1));
    END LOOP;
    FND_FILE.put_line (fnd_file.log,'out of loop');
    FND_FILE.put_line (fnd_file.log,'length of new xml is '||v_clob_len);
    Please, let me know if you need Further clarifications on the same.

  • How to make iTunes read the song's name/singer from the file's name itself?

    Hi everyone,
    So I have this file with songs from everywhere. I spent quite some time now to make sure that the structure of each file's name is as such : "Singer - Song name", hoping that everything would be read by iTunes accordingly. However, either iTunes read it well, or it didn't read it at all ("Singer - Song name" appearing in Title alone), or iTunes read the "media" of the file (ie. what the guy I downloaded it from wrote for it in the Preferences, which usually is in capital letters or with a bunch of weird underscores). As I'm OCD and need everything to be neat, I'm highly tensed right now. I really want everything to be neat and clear!
    So, how do I make sure that iTunes reads the files' names such that it knows the structure is "Singer - Song name"? Thanks.

    iTunes doesn't use file names to determine how music appears in your library,  Rather, it uses metadata that is split between:
    data elements that are embedded within the media files
    data elements that are included in the entries in the iTunes database
    No amount of reorganization, renaming or other manipulation at the file level will make any difference to how songs will appear in iTunes.  Using your example:
    the value of the track number element is 1
    the value of the artist element is "Elvis Presley"
    the value of the song name element is "Blue Suede Shoes"
    Depending on how you configure iTunes then the file name is either:
    completely independent of iTunes (i.,e., the file containing this song could be xyz.mp3)
    dependent on the metadata managed by iTunes, (i.e., when you have these two options set:
    then iTunes will set the file name to be 1-01 Blue Suede Shoes.mp3 where:
    the file is in a folder called "Elvis Presley" (the name of the album)
    that folder is in one called "Elvis Presley" (the name of the artist) which is in iTunes Media\Music
    Going back to your question "How to make iTunes read the song's name/singer from the file's name" the answer is simple - you can't, as this is not how iTunes works.  There are some third-party utilities that you can use to set some metadata element values based on parsing of file names which might be a useful first step.  However, to use iTunes effectively you should really forget about / ignore file names - manage your media using appropriate metadata and allow iTunes to look after file names behind the scenes.

  • How to read XML message present in Table using PL/SQL?

    Hi,
    How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
    Thanks!

    Late reply, but hopefully better late than never.
    You can possibly do it all via a single SQL statement, such as {message:id=4232077}
    XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html

  • Reading XML data from .pages file

    Hi All!
    I've been trying to get a script up and running, but frankly I'm lost. The script should read the date, lesson no, and name fields from a .pages file and then use that information to send an e-mail.
    What I'm having a problem with is reading the data from the .pages file and I don't know what the best way to do it is because I'm still a novice at this.
    So there are two ways I can think of:
    1. Read directly from the Pages document when it is open. The problem with this is that it's a Pages template and it contains tables. Perhaps the easiest thing would be just to select certain cells directly from pages, but I have no idea how they're labeled or how to access them so I came up with a second idea. If you happen to know how to do this, I would greatly appreciate it.
    2. Pages documents can be unzipped and one of the files is an xml file with a lot of tags and the data I need. I found the following post that talks about how to parse XML via an XSL stylesheet. After going through some tutorials, I got stuck because the xml itself in the Pages file is just a mess to me and I'm confused about which node to choose. In other xml docs you can see a clear, nicely laid out tabbed structure so you can at least figure out the path to the node you want. I stumbled across a nice script for TextWrangler which cleans up XML, but it just barks at the Pages file.
    3. On top of that, I will need to use the name field and match that with an Address Book e-mail address. Should I change the template and make it into an address book field?
    Thanks in advance,
    Paul

    The script should read the date, lesson no, and name fields from a .pages file and then use that information to send an e-mail.
    Maybe you might want to try the following script:
    tell application "Pages"
        activate
        tell foreground layer of page 1 of front document
            select (text box 1 whose vertical position < 0.5)
            tell application "System Events"
                keystroke "c" using {command down} -- ⌘C
                keystroke "a" using {shift down, command down} -- ⇧⌘A
            end tell
            set theText to the clipboard
        end tell
    end tell
    set TID to AppleScript's text item delimiters
    set AppleScript's text item delimiters to tab
    set theTextFields to text items of theText
    set AppleScript's text item delimiters to TID
    set {theDate, theLessonNo, theStudent} to {item 2, item 4, item 6} of theTextFields

  • Read XML data from URL

    Hello,
    Greetings to everybody. I am having a problem reading or capturing the XML data being send by a URL and the said URL does not send the XML data as a file, but it just send it out as data.
    I do not know how to capture the said xml data from the said given URL. Please Help. Thank You, very, very, very much.
    Cheers !
    vins
    [email protected]

    public String getXml(String strURL){
    URL url  = null;
    URLConnection conn = null;
    BufferedReader in = null;
    try{
        url = new URL(strURL);
        conn = url.openConnection();
        in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line = null;
        StringBuffer xml = new StringBuffer();
        while ((line = in.readLine()) != null){
            xml.append(line);
    catch (Exception e){ }
    finally {  // close th eresource
    return xml.toString()
    }String xml = getXml("http://www....");
    InputSource source = new InputSource(new StringReader(xml));
    // use a parse to parse the xml document in the inputsource

  • JAXB: Read XML data from a String?

    Hi,
    I get XML data not from file but as a string and I wanted to use JAXB to parse it and get my Java Objects.
    The unmarshall methods wants an "InputStream", but "StringBufferInputStream" is deprecated, so that I don't know a way to use my String as InputStream.
    Can someone give me a hint other then writing the data in a file first?

    Hi FrankSch,
    The unmarshall methods wants an "InputStream", but
    "StringBufferInputStream" is deprecated, so that I
    don't know a way to use my String as InputStream.
    Can someone give me a hint other then writing the data
    in a file first?Yes, the class StringBufferInputStream is deprecated, and the deprecation notice reads:
    Deprecated. This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.
    The JDK API usually mentions an alternative to the deprecated method/class and in this case, you should use java.io.StringReader. It has one constructor and should suite you nicely:
    StringReader(String s) That way, you get an InputStream object; you can now use JAXB.
    Hope this helps,
    -ike, .si

  • How to read XML Data stored as Clob

    Hi
    I am new to clob & XML types...
    An XML data has been inserted into a Clob field in a Oracle(9.2.0.8.0) Table
    CREATE TABLE TEMP
    SNO NUMBER(5),
    STR_VAL LONG,
    CREATED_DT DATE DEFAULT sysdate,
    COL2 CLOB,
    COL3 SYS.XMLTYPE
    SELECT dbms_lob.getlength(col2) from temp
    ->24754
    SQL> select col2 from temp;
    COL2
    &lt;DataSet1&gt;
    &lt;TAGSDATATABLE&gt;
    &lt;TAG_NAME&gt;KST20001&lt;/TAG_NA
    If i use the above stmt it shows only pice of data
    how can i get the actual data from this column.
    could anyone help to get the data.
    Regards
    Prakash
    Edited by: user12957183 on Aug 25, 2010 12:25 AM

    Insert data in to XMLTYPE table from clob variable:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  my_clob CLOB := '<DataSet1><TAGSDATATABLE><TAG_NAME>KST20001</TAG_NAME>
      3  </TAGSDATATABLE><TAGSDATATABLE><TAG_NAME>KST20002</TAG_NAME></TAGSDATATABLE>
      4  <TAGSDATATABLE><TAG_NAME>KST20003</TAG_NAME></TAGSDATATABLE>
      5  <TAGSDATATABLE>
      6  <TAG_NAME>KST20004</TAG_NAME>
      7  </TAGSDATATABLE>
      8  <TAGSDATATABLE>
      9  <TAG_NAME>KST20005</TAG_NAME>
    10  </TAGSDATATABLE>
    11  <TAGSDATATABLE>
    12  <TAG_NAME>KST20006</TAG_NAME>
    13  </TAGSDATATABLE>
    14  <TAGSDATATABLE>
    15  <TAG_NAME>KST20007</TAG_NAME>
    16  </TAGSDATATABLE>
    17  <TAGSDATATABLE>
    18  <TAG_NAME>KST20008</TAG_NAME>
    19  </TAGSDATATABLE>
    20  <TAGSDATATABLE>
    21  <TAG_NAME>KST20009</TAG_NAME>
    22  </TAGSDATATABLE>
    23  <TAGSDATATABLE>
    24  <TAG_NAME>KST20010</TAG_NAME>
    25  </TAGSDATATABLE>
    26  <TAGSDATATABLE>
    27  <TAG_NAME>KST20009</TAG_NAME>
    28  </TAGSDATATABLE>
    29  </DataSet1>';
    31  BEGIN
    33  INSERT INTO my_tab1 VALUES(XMLTYPE(my_clob));
    34* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> desc my_tab1;
    Name                                                                                                                  
    TABLE of XMLTYPE
    SQL>
    -- For larger data:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  my_clob CLOB := '<DataSet1>
      3  <TAGSDATATABLE>
      4  <TAG_NAME>KST20001</TAG_NAME>
      5  </TAGSDATATABLE>
      6  <TAGSDATATABLE>
      7  <TAG_NAME>KST20002</TAG_NAME>
      8  </TAGSDATATABLE>
      9  <TAGSDATATABLE>
    10  <TAG_NAME>KST20003</TAG_NAME>
    11  </TAGSDATATABLE>
    12  <TAGSDATATABLE>
    13  <TAG_NAME>KST20004</TAG_NAME>
    14  </TAGSDATATABLE>
    15  <TAGSDATATABLE>
    16  <TAG_NAME>KST20005</TAG_NAME>
    17  </TAGSDATATABLE>
    18  <TAGSDATATABLE>
    19  <TAG_NAME>KST20006</TAG_NAME>
    20  </TAGSDATATABLE>
    21  <TAGSDATATABLE>
    22  <TAG_NAME>KST20007</TAG_NAME>
    23  </TAGSDATATABLE>
    24  <TAGSDATATABLE>
    25  <TAG_NAME>KST20008</TAG_NAME>
    26  </TAGSDATATABLE>
    27  <TAGSDATATABLE>
    28  <TAG_NAME>KST20009</TAG_NAME>
    29  </TAGSDATATABLE>
    30  <TAGSDATATABLE>
    31  <TAG_NAME>KST20010</TAG_NAME>
    32  </TAGSDATATABLE>
    33  <TAGSDATATABLE>
    34  <TAG_NAME>KST20009</TAG_NAME>
    35  </TAGSDATATABLE>
    36  <TAGSDATATABLE>
    37  <TAG_NAME>KST20009</TAG_NAME>
    38  </TAGSDATATABLE>
    39  <TAGSDATATABLE>
    40  <TAG_NAME>KST20009</TAG_NAME>
    41  </TAGSDATATABLE>
    42  <TAGSDATATABLE>
    43  <TAG_NAME>KST20009</TAG_NAME>
    44  </TAGSDATATABLE>
    45  <TAGSDATATABLE>
    46  <TAG_NAME>KST20010</TAG_NAME>
    47  </TAGSDATATABLE>
    48  <TAGSDATATABLE>
    49  <TAG_NAME>KST20009</TAG_NAME>
    50  </TAGSDATATABLE>
    51  <TAGSDATATABLE>
    52  <TAG_NAME>KST20009</TAG_NAME>
    53  </TAGSDATATABLE>
    54  <TAGSDATATABLE>
    55  <TAG_NAME>KST20009</TAG_NAME>
    56  </TAGSDATATABLE>
    57  <TAGSDATATABLE>
    58  <TAG_NAME>KST20009</TAG_NAME>
    59  </TAGSDATATABLE>
    60  <TAGSDATATABLE>
    61  <TAG_NAME>KST20010</TAG_NAME>
    62  </TAGSDATATABLE>
    63  <TAGSDATATABLE>
    64  <TAG_NAME>KST20009</TAG_NAME>
    65  </TAGSDATATABLE>
    66  <TAGSDATATABLE>
    67  <TAG_NAME>KST20009</TAG_NAME>
    68  </TAGSDATATABLE>
    69  <TAGSDATATABLE>
    70  <TAG_NAME>KST20009</TAG_NAME>
    71  </TAGSDATATABLE>
    72  <TAGSDATATABLE>
    73  <TAG_NAME>KST20009</TAG_NAME>
    74  </TAGSDATATABLE>
    75  <TAGSDATATABLE>
    76  <TAG_NAME>KST20010</TAG_NAME>
    77  </TAGSDATATABLE>
    78  <TAGSDATATABLE>
    79  <TAG_NAME>KST20009</TAG_NAME>
    80  </TAGSDATATABLE>
    81  <TAGSDATATABLE>
    82  <TAG_NAME>KST20009</TAG_NAME>
    83  </TAGSDATATABLE>
    84  <TAGSDATATABLE>
    85  <TAG_NAME>KST20009</TAG_NAME>
    86  </TAGSDATATABLE>
    87  <TAGSDATATABLE>
    88  <TAG_NAME>KST20009</TAG_NAME>
    89  </TAGSDATATABLE>
    90  <TAGSDATATABLE>
    91  <TAG_NAME>KST20010</TAG_NAME>
    92  </TAGSDATATABLE>
    93  <TAGSDATATABLE>
    94  <TAG_NAME>KST20009</TAG_NAME>
    95  </TAGSDATATABLE>
    96  <TAGSDATATABLE>
    97  <TAG_NAME>KST20009</TAG_NAME>
    98  </TAGSDATATABLE>
    99  <TAGSDATATABLE>
    100  <TAG_NAME>KST20009</TAG_NAME>
    101  </TAGSDATATABLE>
    102  <TAGSDATATABLE>
    103  <TAG_NAME>KST20009</TAG_NAME>
    104  </TAGSDATATABLE>
    105  <TAGSDATATABLE>
    106  <TAG_NAME>KST20010</TAG_NAME>
    107  </TAGSDATATABLE>
    108  <TAGSDATATABLE>
    109  <TAG_NAME>KST20009</TAG_NAME>
    110  </TAGSDATATABLE>
    111  <TAGSDATATABLE>
    112  <TAG_NAME>KST20009</TAG_NAME>
    113  </TAGSDATATABLE>
    114  <TAGSDATATABLE>
    115  <TAG_NAME>KST20009</TAG_NAME>
    116  </TAGSDATATABLE>
    117  <TAGSDATATABLE>
    118  <TAG_NAME>KST20009</TAG_NAME>
    119  </TAGSDATATABLE>
    120  <TAGSDATATABLE>
    121  <TAG_NAME>KST20010</TAG_NAME>
    122  </TAGSDATATABLE>
    123  <TAGSDATATABLE>
    124  <TAG_NAME>KST20009</TAG_NAME>
    125  </TAGSDATATABLE>
    126  <TAGSDATATABLE>
    127  <TAG_NAME>KST20009</TAG_NAME>
    128  </TAGSDATATABLE>
    129  <TAGSDATATABLE>
    130  <TAG_NAME>KST20009</TAG_NAME>
    131  </TAGSDATATABLE>
    132  <TAGSDATATABLE>
    133  <TAG_NAME>KST20009</TAG_NAME>
    134  </TAGSDATATABLE>
    135  <TAGSDATATABLE>
    136  <TAG_NAME>KST20010</TAG_NAME>
    137  </TAGSDATATABLE>
    138  <TAGSDATATABLE>
    139  <TAG_NAME>KST20009</TAG_NAME>
    140  </TAGSDATATABLE>
    141  <TAGSDATATABLE>
    142  <TAG_NAME>KST20009</TAG_NAME>
    143  </TAGSDATATABLE>
    144  <TAGSDATATABLE>
    145  <TAG_NAME>KST20009</TAG_NAME>
    146  </TAGSDATATABLE>
    147  </DataSet1>';
    148  l_xmltype xmltype;
    149  BEGIN
    150  --l_xmltype := my_clob;
    151  INSERT INTO my_tab1 VALUES(XMLTYPE(my_clob));
    152* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> Edited by: AP on Aug 25, 2010 4:46 AM

  • Problem in mapping xml data with header details from IPM 11g to BPEL

    Hi,
    I want to map xml data as a supporting content from IPM application to BPEL.
    My xml is
    <?xml version="1.0" encoding="utf-8"?>
    <DocumentFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/Document.xsd">
    <Document DocumentType="Invoice">
    <DocumentImage>
    <Filename>\\10.205.0.209\Img\10883212.TIF</Filename>
    </DocumentImage>
    </DocumentFile>
    If I remove header details from root element <DocumentFile> i.e. modified xml is
    <DocumentFile>
    <Document DocumentType="Invoice">
    <DocumentImage>
    <Filename>\\10.205.0.209\Img\10883212.TIF</Filename>
    </DocumentImage>
    </DocumentFile>
    it works fine but i need to pass header details as well.
    Please suggest.
    Thanks,
    Priya

    Hi Naveen,
    In sxmb_moni the content transmitted to the adapter(RFC)is as follows
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:ZRFID_EQUIP xmlns:ns="urn:sap-com:document:sap:rfc:functions">
    - <RECORDS>
    - <item>
      <FLOC>f1-01-01</FLOC>
      <RFID_NO>I006</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-02</FLOC>
      <RFID_NO>I002</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-03</FLOC>
      <RFID_NO>I003</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-04</FLOC>
      <RFID_NO>I004</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-05</FLOC>
      <RFID_NO>I005</RFID_NO>
      </item>
    - <item>
      <FLOC>f1-01-06</FLOC>
      <RFID_NO>I001</RFID_NO>
      </item>
      </RECORDS>
      </ns:ZRFID_EQUIP>
    At r/3 side the field floc and rfid_no gets mapped to floc which is of char30
    eg floc=f1-01-01I006
       rfid_no=

  • How to read XML by item name

    We have a XML config file as attachement.
    It has many jobs' configuration in it(<Job>).
    For every job, therer will be a item of <JobActive> with value of Y or N.
    Sometimes, we need to toggle the Y or N for some certain jobs.
    I tried to read the <JobName> by the attached vi.
    But when I read it, I can only read the items by sequence one by one.
    Is it possible to read by the item name or by index?
    We will have many <job> in the future.
    Thanks,
    Attachments:
    Temperature Test Data.vi ‏58 KB

    Hi,
    I tried opening up your VI to take a closer look, but unfortunately there are broken wires corresponding to your application.  Unfortunately I am not able to test your VI here.  Can you please explain your application further so that we can be able to help you out.
    Regards,
    Nadim R
    Applications Engineering
    National Instruments

  • How can I get a date without the hour from sql server 2000 ?

    hellou!
    I have a JTable, and one of it's columns has to show a date. This date i have to show is specified as datetime on the Sql Server 2000 database where I have to take the data.
    the query of the dataset attached to the JTable is something like "select * from Table".
    The problem is that the JTable column that displays the date shows the date and the hour, for example:
    7/10/04 0:00:00
    and I need to show the date without the hour, only the 7/10/04. Can anyone tell me how to do that?
    thank you very much! : )

    The easiest way to format a date is with java.text.SimpleDateFormat. When creating it you pass a format string which can be used to parse or format date objects.
    SimpleDateFormat formater = new SimpleDateFormat( "MM/dd/yyyy" );
    // Get date objects directly from sql
    Date foundDate = result.getDate( 1 );  //where result is the ResultSet and 1 is the date column
    String formatedDate = formater.format( foundDate );Now the JTable's table model can be adjusted to store a formated String instead of a Date. If for some reason it is required to store the value as a Date overload the table model to return the formated string when getValueAt is called.

  • How to read XML data Generated out of Personnel Change Request?

    Hi,
    Is it possible to read the following attributes of an XML file which is generated from a PCR form created on Enterprise Portal:
    1. Time Stamps
    2. Data
    3. Location
    Any pointer will be of a great help.
    Thanks
    Deepak

    hi,
    pls chk this link.
    /people/tobias.trapp/blog/2006/08/22/xml-processing-in-abap-part-8--using-xslt-for-validation
    Regards
    Raja

  • Problem while reading xml data

    private var _xlimData:XML=
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master>sample-layout</fo:layout-master>
    </fo:root>
    var fo:Namespace = new Namespace(http://www.w3.org/1999/XSL/Format);
    public function readXlim():void
    Alert.show(_xlimData..fo::layout-master);
    I am unable to read the data because of Hyphen(-) in 'layout-master' .But placing Hyphen(-) is 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 spam my blog next time. If you are facing a problem, please post your questions here so that others can also learn from the example in case they run into the same problem. Thanks.

Maybe you are looking for