Pull data from a table in HTML format from external URL into a Servlet

How do I pull data from existing website html table into a Servlet?
I will need to pull the data into a servlet. So, the servelet will need to go to the URL and get the data and save them as variables.
I know I will need an array to store the data. I just dont know how to call the URL and have the servelet search the site for the <table> </table>.
I will later use this to save to a database.
Thanks
Edited by: DJMegabit on Apr 14, 2010 7:36 PM

Maybe give us more details about what exactly You'd like to achieve. I guess that there might be better solutions to the problem.

Similar Messages

  • Writing from internal table to xml format

    Hi,
    I searched all the forum and I have a question on writing the data from internal table in xml format to the file on app.server.
    Data: ITAB1   TYPE TABLE OF SPFLI,
             L_XML  TYPE REF TO CL_XML_DOCUMENT.
      SELECT * FROM SPFLI INTO TABLE ITAB1.
    CREATE THE XML OBJECT
      CREATE OBJECT L_XML.
    CONVERT THE DATA TO XML
      CALL METHOD L_XML->CREATE_WITH_DATA( DATAOBJECT = ITAB1[] ).
    after this how to move the XML data in the object to a file on app.server.
    Thanks

    p_ufile is the path of the application server
    p_output is the internal table with data to be moved to app serv.
    OPEN DATASET p_ufile FOR OUTPUT IN TEXT MODE.
    LOOP AT p_output INTO wa_file.
    TRANSFER wa_file TO p_ufile.
    CLEAR wa_file.
    ENDLOOP.
    CLOSE DATASET p_ufile.
    for XML I guees the path p_ufile ill be <b>sap/usr/tmp/file.xml</b>

  • How to send mails in HTML format from the send mail step of workflow?

    Hi,
    I have a requirement where I need to send mails in the html format from the send mail step of the workflows.
    But what I found out that the html tags are not renderd and as such the output is in plain text.
    I know that there is an alternative of using an activity step and use my own custom code from within there,But due to certain business constraints, I need to use the send mail step only.
    My SCOT settings are all right.
    Please let me know how it can be done.
    Thanks,
    Samrat.

    Samrat,
    It can't be done, you have to use your own activity step.
    What are these constraints that refrain you from doing that?
    Rgds,
    Patrick

  • How to send a mail in html format from a send mail workflow node ?

    Dear all,
    Do you know if it is possible to send an e-mail in HTML format (instead of RAW) from a "send mail" node in a workflow ?  ... if "yes", please, let me know.
    (I need to do that because I want to use the "href" tag to insert an hyperlink inside the e-mail)
    - I haven't found any parameter to specify the format of the e-mail.
    - Inside SCOT I tried to change the parameters for the SMTP node... without success.
    - I don't want to use a task calling the FM SO_OBJECT_SEND.
    Nicolas

    Hi Nicolas!
    Have you tried to set "Output Format" for "RAW Text" to HTM in SCOT.
    If HTM is missing in your dropdown-list, you could check out table SXCONVERT2. Copy the line with category T/format TXT, and change the format from TXT to HTM. The existing function
    SX_OBJECT_CONVERT__T.TXT does not need to be changed. Now you should be able to choose HTM in SCOT. You will probably need som HTML-tags in your text to make it look good.
    Hope this helps!
    Regards
    Geir

  • How to convert CLOB data (now it is in html format) to Normal text format

    Hi,
    Can anybody let me know the solution for how to convert CLOB data into normal Text.In my case the table column having CLOB datatype and the data is in html format.when i run the report the column is displaying html tags .Now i need to convert that html tags into normal text.
    Pl. let me know if any one know the solution.
    Regards,
    Thulasi.K

    LONG has been depricated since 8i so I don't believe there is a general solution to go backwards short of reloading the data.
    Justin

  • Problem reading external HTML format from text file

    I have a text file containing html formatted text which I try to get into a textfield.
    All works fine locally and even on my localhost test server, but when uploading to the real server - I get a blank.
    Anyone have any ideas? THANKS
    The text file :
    &t2=<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="14" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">Some text here</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="14" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">One more line</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="14" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">And more text here</FONT></P></TEXTFORMAT>
    and the AS code in the movie:
    viewData.onPress = function() {
         //get text
         loadText()
    var tz
    function loadText() {
    var my_lv:LoadVars = new LoadVars();
    my_lv.onLoad = function(success:Boolean) {
      if (success) {
      //trace(this.toString())
      mytext.htmlText= this.t2;
      } else {
      //trace("Error loading/parsing LoadVars.");
    my_lv.load("myfile.txt");

    Thanks kglad, I did it and it made me find the real problem:
    The text file is generated by PHP script that gets an html formated text from flash (it is an online editing part of an application):
    the AS code to call the php:
    var send_lv:LoadVars = new LoadVars();
    send_lv.t1 = "&t2="+editor.t1.htmlText+"&";
    send_lv.sendAndLoad("write.php", res_lv, "POST");
    the PHP:
    <?php
    $mydata = $_POST["t1"];
    $myFile = "recipe.txt";
    $fh = fopen($myFile, 'w') or die("can't open file");
    fwrite($fh, $mydata);
    fclose($fh);
    print "&done=done";
    ?>
    From some reason the online server adds \ before any " , but WAMP doesn't.
    here is the text generated on localhost (WAMP)
    &t2=<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="14" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">local text</FONT></P></TEXTFORMAT>&
    online server:
    &t2=<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Comic Sans MS\" SIZE=\"14\" COLOR=\"#FF0000\" LETTERSPACING=\"0\" KERNING=\"0\">online text</FONT></P></TEXTFORMAT>&
    I know its not a Flash problem now, but do you have any idea?
    Thanks

  • How to extract code from text box in html format

    "I have a text box. When the form is submitted I need to extract the data in html format. i.e. a string type variable needds to hold all html tags alongwith[b] the data."

    A textbox submitted in a form delivers a String. What's inside is no issue. If you want to process it further, pick the tool of your choice, like an HTML parser.

  • Reading the XML message from Xi stored in XML format from a abap program.

    Hi Gurus,
    My requirement here is to read the data that will be coming from Xi from my custom abap program and updating 2 data base tables. The method is after the data mapping is done a class is generated in abap proxy in which a method is available. Inside the method i am writing the code for getting the Xi data stored as a payload message which can be seen in the transaction SXMB_MONI. My code is given below.
    ***begin code***
    method ZII_PAYROLL_HEADER_IN~PAYROLL_HEADER_IN.
    **** INSERT IMPLEMENTATION HERE **** ***
    data: ln type i.
    DATA: i_items TYPE TABLE OF ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
    *DATA: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_TAB5.
    data: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
    DATA:PERNR TYPE STRING.
    *data: it_ZPAYLOAD_WRAPPER16  TYPE ZPAYLOAD_WRAPPER16.
    I_ITEMS[] = INPUT-PAYLOAD_WRAPPER-BODY-XMLDOC-PAYROLL_PERIOD_OVERVIEW-EMPLOYEE_RECORD[].
    *I_ITEMS = INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
    describe table i_items[] lines ln.
    endmethod.
    **End code***
    As per the logic the data stored in the XML message should be avaialble in INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord which i am assigning to a local internal table in the class.
    But in my case there is no data coming in
    INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
    But i can see the data transffered from XI in the transaction SXMB_MONI->XML message->inbound message->payload.
    Is there any way to read the data stored in the XML message in the transaction SXMB_MONI.
    Also why the data is not coming in
    INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord inside the class.
    If there is any solution for this problem please post it.

    You can use function module SXMB_GET_MESSAGE_PAYLOAD.
    Code snippet:
    DATA: ls_mast      TYPE sxmspmast,
          ls_msgkey    TYPE sxmsmkey,
          lv_bin_xml   TYPE xstring,
          lv_str_xml   TYPE string.
    * select sxmspmast into ls_mast
      ls_msgkey-msgid  = ls_mast-msgguid.
      ls_msgkey-pid    = 'RECEIVER'.
      CALL FUNCTION 'SXMB_GET_MESSAGE_PAYLOAD'
        EXPORTING
          im_msgkey      = ls_msgkey
          im_archive     = ' '
          im_version     = ls_mast-vers
        IMPORTING
          ex_msg_bytes   = lv_bin_xml
        EXCEPTIONS
          not_authorized = 1
          no_message     = 2
          internal_error = 3
          no_payload     = 4
          OTHERS         = 5.
      IF sy-subrc EQ 0.
          lv_str_xml = cl_soap_moni_helper=>convert_xstring_to_string( xstring_in = lv_bin_xml ).
      ENDIF.

  • Data from table in xml Format and Inserting it into  Table

    Hi All
    I have table where xml data is stored in long format with xml tag know i have read the entire xml xoulmn which is xml tag and insert it into diffrent table can any suggest me the code
    Thanks & Regards

    I believe you are on the wrong forum. You want the XML DB forum.
    See:
    XML DB

  • How can I copy text from a table in a format that's readable when I paste it into an internet based data recording system?

    I have to fill in forms regarding foster children every week, then export the text to an on-line data recording system for each child. The old pages let me copy (cmdA ) the whole document and past it into where it needs to go.
    The new version includes inverted commas and I have to copy the document headers separately from the information contained in the table. It's a bit of a pain!

    I have to fill in forms regarding foster children every week, then export the text to an on-line data recording system for each child. The old pages let me copy (cmdA ) the whole document and past it into where it needs to go.
    The new version includes inverted commas and I have to copy the document headers separately from the information contained in the table. It's a bit of a pain!

  • Send message in HTML format from Service Desk

    Dear All,
    I have configure Service Desk in Solution Manager 7 EHP1 (ABAP+JAVA Stack).
    I am able to send the message to end user in case of change status from "New" to "In process" in PDF or TEXT format.
    I want to send same in HTML with link just like SAP Support message we are getting in our inbox.
    How to do that?
    Thanks in advance,
    Nirav

    Hello Nirav,
           Its not that easy, take a look a this excellent blog /people/riccardo.escher/blog/2009/10/09/pep-up-your-charm--part-3-turn-cinderella-pdf-mails-into-prettyusefull-ones
    Hope that helps,
    Federico

  • Download data from internal table to excel sheet from the background

    Hello Experts,
    I have written a code where the data is stored in the internal table . Now when i run this code in the background i want this internal table data to get downloaded in the excel sheet. The function module GUI_DOWNLAOD is not supported in the background. So is there any other function module that can be used or is there any other way to do this
    Thanks in advance

    Hi Aditya,
    I would provide you 2 advice:
    1. save the file on the application server as text file and the fileds in it separated by TAB,you can download the file whenever you want and open it with excel.
    2.generate excel files and send it to the email address whatever you specify in the selection-screen.
    Thanks,
    Sam

  • How to remove the HTML formatting from error sources

    Does anybody have a good way to strip the HTML mark-up that often shows up in the source field of an error cluster.  I would like to log the error source to a text file, and display the error source in a text control, without the HTML mark-up.
    I'm using LabView 8.5, but I'm sure a solution for an older version of LabVIEW can be easily adapted to the latest version.
    Thanks,
    Mark Moss

    smercurio_fc,
    that is what I get on my system (Win XP Pro SP2, LV 8.0.1 and newer). If you see it different there must be something different between my and your system.
    Message Edited by waldemar.hersacher on 03-10-2008 12:45 PM
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions
    Attachments:
    HMTLinSimpleErrorHandler.png ‏11 KB

  • Show name from one table, and a sum from another table.

    Hi,
    For instance: I have 2 tables.
    1. Table1 has fields TenantID, TenantName,
    2. Table2 has fields AmmountCredit, AmmountDebit, TenantID.
    I need the following behavior.
    In the detailed section I want my report to show a list of TenantName, and a SUM of AmmountCredit minus Ammount Debit for that Tenant (which will come from Table2).
    How would I do this?  If a formula is involved, please provide an example because I'm fairly new to Crystal Reports.
    Thanks
    Aron

    Hi Aron,
    Please see if this helps:
    1) Go to the Database Expert > Add the two tables > Go to the Links tab > Join the two tables on the 'Tenant ID' field using an 'Inner Join' > Click OK
    2)  In the report, go to the Group Expert and create a group on the 'Tenant ID' field
    3) Place the 'Tenant Name' field on the Group Header 1
    4) Suppress the Details Section
    5) Create a formula with this code and place it on the Group Header 1:
    Sum({AmountCredit}, {TenantID}) - Sum({AmountDebit}, {TenantID})
    Here, {TenantID} is the Group field. So replace these fields with the right fields from your datasource.
    -Abhilash

  • Best way to select from 2 tables, based on sum from detail table

    I have a "customer order line detail" table from which I want to report
    Order Number
    Customer Number
    Part Number
    Line Value { which is Unit Qty * (Unit price - discount%) }
    But only for orders which are above £1500.
    And lines which are not "Cancelled"
    I have access to an API which returns the total order value for the order.
    I am currently using this in my criteria, eg:
    select order_no, customer_no, part_no, round(unit_qty *(unit_price - unit_price *(discount/100)),2) Line_value
    from customer_detail
    where
    status != 'Cancelled'
    and
    Customer_Order_API.Get_Total_Sale_Price__(order_no)>=1500
    The API contains the following:
    SELECT SUM(ROUND((qty * price_conv_factor * unit_price), rounding_) -
    ROUND((qty * price_conv_factor * unit_price) -
    ((qty * price_conv_factor * unit_price) * ((1 - discount / 100) * (1 - order_discount / 100))), 2))
    FROM customer_detail
    WHERE order_no = order_no_
    AND state != 'Cancelled'
    AND line_item_no <= 0
    (that uses a price conversion factor that I don't use, since it's always 1)
    My query runs so slowly, because it is getting the order value for every line of the order, is it possible to improve?
    Thanks

    Thanks for the suggestion, it was close to what I needed.
    I ended up with this:
    select order_no,  name, ref_id, c_salesman_sub_division, line_value, catalog_desc
    from
    (SELECT coj.customer_no, coj.order_no, ifsapp.customer_info_api.GET_NAME(customer_no) name, coj.ref_id,
           coj.c_salesman_sub_division, ROUND((coj.buy_qty_due * coj.
           price_conv_factor) * coj.sale_unit_price, 2) - ROUND((coj.buy_qty_due *
           coj.price_conv_factor) * coj.sale_unit_price - ((coj.buy_qty_due * coj.
           price_conv_factor) * coj.sale_unit_price) * ((1 - coj.discount / 100) *
           (1 - coj.order_discount / 100)), 2) line_value, coj.catalog_desc,
    SUM( ROUND((coj.buy_qty_due * coj.
           price_conv_factor) * coj.sale_unit_price, 2) - ROUND((coj.buy_qty_due *
           coj.price_conv_factor) * coj.sale_unit_price - ((coj.buy_qty_due * coj.
           price_conv_factor) * coj.sale_unit_price) * ((1 - coj.discount / 100) *
           (1 - coj.order_discount / 100)), 2)) OVER (PARTITION BY Coj.ORDER_NO) AS SUM_ORDER
        FROM ifsapp.customer_order_join coj
        WHERE coj.order_no = coj.order_no
          AND TRUNC(coj.date_entered) = NVL(TO_DATE('25/01/2007', 'DD/MM/YYYY'),
              TRUNC(SYSDATE))
          AND coj.authorize_code = 'UKMEDM'
          AND coj.line_item_no >= 0
          AND coj.ref_id <> 'SAMP'
          AND coj.state <> 'Cancelled'
    where sum_order >=1500
        ORDER BY ref_id, c_salesman_sub_division, customer_no, order_no
    /[pre]
    But I have realised the problem with this.  Not sure if I made it clear, to myself even, but I need to include
    order lines added on a particular day (that are not cancelled)
    for orders which total >= £1500.
    If one line of an order is added for £900 but the rest of the order is £2000 then that line should be shown.
    My SQL only shows lines added for the day >= 1500.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Time Machine and drive permissions question

    I'm using Time Machine on a MacBook with two admin accounts (let's call them admin1 and admin2). admin2 is the account used daily. admin1 is the account used very infrequently. Things were set up with admin1. I noticed today when I was logged in as a

  • Shared Services Stopping Frequently

    Hi, I have installed Hyperion Planning 9.3.1 on Windows Server 2003 SP2 in the following sequence 1.     Shared services and ran its configuration utility 2.     EAS - Installation and configuration 3.     Essbase Server- Installation and configurati

  • Creating a region inside another region

    Hi, I have created a region with a report. Inside that region, I want to create another region with a report. How do I do this? Thanks.

  • Artifacts/specks in the ENCORE build

    Hi, Sorry if this is a newbie question, but we just can't figure this one out. We built an ENCORE file from a QT MASTER (895 gigs) which was originally exported from a FCP MASTER. In the ENCORE "BUILD" there are white specks and black specks/artifact

  • IMovie for PAL using 1080i DV

    I have taken a lot of DV footage with a Sont HDR-HC3 that shoots in 1080i. When projected directly from the camera onto my 1080i Panasonic screen, the quality of the footage is outstanding. However when captured through iMovie HD 6 and burn a DVD wit