How to extract the 'display text' of the URLs?

Hi,
I want to extract the 'display text' of a link inside an html page? I am using HTML Toolkit class and the getAttribute method...How can i do that since the text is out of 'Attribute'. How to get this text?
Thanx in advance

You should try passing the input stream to a Scanner or a BufferedReader and that way you should be able to read in lines of text.
HttpURLConnection a = null;
          URL b;
          Scanner in = null;
          try {
               b = new URL("http://www.google.com");
               a = (HttpURLConnection) b.openConnection();
               in = new Scanner(a.getInputStream());
               while(in.hasNext())
                    System.out.println(in.nextLine());
          } catch (Exception e) {
               e.printStackTrace();
          }Edited: Something like the above.

Similar Messages

  • How to display the dynamic text in the selection screen

    Hi All,
    I want to display the dynamic text in the selection screen .... ( I searched in forums , didnt get the any answer fot this sort of qustion ).....
    EX: If i have the date of today 31st  it has to show message like " today date is 31 like some thing "  when i execute the report .
    Could any one face this sort of requirment, Please let me know.
    Thanks in advance.
    Reagrds,
    Bharani

    Where would you like this dynamic text being displayed? As an "message" or in some parameter field?
    If first
    parameters date type d.
    data: text type string.
    at selection-screen.
       concatenate 'Today is' date into text.
       message text type 'I'.
    If second
    parameters pa_text type c length 50.
    at selection-screen on date.
      if date is not initial.
        concatenate 'Today is' date into  pa_text.
      enidf.
    at selection-screen output.
       "show it as read only
       loop at screen.
        if screen-name = 'PA_TEXT'.
               screen-input = abap_false.
              modify screen.
        endif.
       endloop.
    Regards
    Marcin

  • How can you change the display size on the task bar

    how do you change the display size on the task bar

    If, however, you want to change the size of the display of the menubar, meaning make the icons and text larger, there is no way to do that directly other than to change the resolution of the screen.
    You can change the as-viewed size of that temporarily by using either -
    • Mouse zoom - if you have a Magic Mouse (Apple wireless mouse), hold down the Control key and use the scroll up and scroll down finger gestures on the mouse.
    • Zoom - go to System Preferences > Universal Access > Seeing and turn on Zoom. You can also use the noted keyboard shortcut to enable/disable this Zoom feature.

  • How to update the sales text in the Sales Order.

    Dear all,
    I want to Update the sales text in the Sales Order. I used the "CREATE_TEXT" but i couldn't update using it.
    Can u please guide me, how to use the Function Module to update the sales Order line item text values.
    Thank U
    Uwanthi

    HI
    Check this link
    User Exit to update Sales order text (Terms of delivery) on saving it
    Regards,
    Krishna

  • How do I receive multiple texts from the same sender, each individually?

    How do I receive multiple texts from the same sender, each individually?

    So I receive automated reminders from my job & I want them to come individually. For example, one text -- time stamped 10:14 pm, then another 11:12 am, coming as separate msgs.

  • How do I select the entire text when the focus is moved to one TextBox?

    How do I select the entire text when the focus is moved to one TextBox?
    There are three TextBoxes.  I use <TextBox TabIndex="1"/> to set the order they are selected.  When I enter one specific TextBox, I would like to have the entire text selected ... one key stroke removes all of the text in that TextBox.
    bhs67

    I do it the following way:
    1.  Override the OnStartup for the application.  Use the following code: (VB.NET)
    EventManager.RegisterClassHandler(GetType(TextBox), TextBox.GotFocusEvent, New RoutedEventHandler(AddressOf TextBox_GotFocus))
    2.  In the event handler use this code (again VB.NET)
    Private Sub TextBox_GotFocus(ByVal sender As Object, ByVal e As RoutedEventArgs)
    _theTextBox = CType(sender, TextBox)
    If setFocusTimer IsNot Nothing Then
    RemoveHandler setFocusTimer.Tick, AddressOf setFocusTimer_Tick
    End If
    setFocusTimer = New DispatcherTimer
    setFocusTimer.Interval = TimeSpan.FromMilliseconds(10)
    AddHandler setFocusTimer.Tick, AddressOf setFocusTimer_Tick
    setFocusTimer.Start()
    End Sub
    Private Sub setFocusTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
    setFocusTimer.Stop()
    _theTextBox.SelectAll()
    End Sub
    What this does is register a handler for every textbox in your application.  This will execute when the GotFocus event is raised and will allow you to do whatever (in this case select all) you want.  A great way of handling things at the application
    level.
    Lloyd Sheen

  • I would like to know how to extract my old contacts from the iTunes backup? Please explain in basic english i am a beginner

    I have had my old Iphone 5s replaced with a new one but I would like to know how to extract my old contacts from the iTunes backup? Please explain in basic english i am a beginner

    Hey,
    I think you will find that you have to have a debit/credit card stored on yur account regardless of whether your have iTunes Credit or want to purchase a free App. I don't know why, I assume its for ID verification or is part of the terms and conditions. I occasionally have to re-verify my credit card info even when just trying to run Update on one of my Apps or like I said downloading a free App.
    If you need further clarification all you can do is contact iTunes Support:
                   https://expresslane.apple.com/ServiceOptionAction.action
    Hope this helps. Andrew

  • How to place an image in database and how to retrieve and display it in the front end

    how to place an image in database and how to retrieve and display it in the front end
    and to place an image in database and retrieve the image from database using xml
    please,help me out.

    Create a table with a Long RAW Datatype column for storing the Image Column Data.
    Create the form based on the table , which by defaults the column with LONG RAW atatype to a Image Item.
    You can use Forms Built in function READ_IMAGE_FILE to read a Image file stored on the file system in to the image item.
    A save on the form saves the image in the Image item in the long raw column.

  • When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

    When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

    When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

  • How do I change the display order in the VPN menu in the status bar?

    Hello,
    How do I change the display order in the VPN menu in the status bar?
    (in the drop-down menu from this icon) ->
    Thanks.

    Hello. Perhaps this is because you are trying to arrange the order of many VPN services, since only one VPN service can be selected at once in System Preferences. In my original post, I did not mean that; I meant that I wanted to arrange the order of VPN configurations within a VPN service. In this screenshot, I have one VPN service only:
    And in the following one, it is shown that there are more than one VPN configurations within that VPN service:
    Furthermore, it was the order of VPN configurations that I wanted to change, not the order of VPN services. If you are trying to change the order of VPN services, I do not have a solution.

  • How to align the item text in the combobox vertically centred after increasing the height of the combobox in mfc?

    I want to make the item text of the combobox to  be aligned vertically(Centred) . Actually I increased the height 
    of the combobox and after the increasing the combobox height, the text is not centred vertically.The code
    snippet for increasing the height is as follows,
    m_SpecifyCombo.SetItemHeight(-1,20);//CCombobox m_SpecifyCombo
    After increasing the height the text in the combobox is not in the centre as shown in the below image,
    But I want the text to be centred as shown in the below image.
    Code snippet for owner drawn combobox:
    #if !defined(AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_)
    #define AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_
    #if _MSC_VER >= 1000
    #pragma once
    #endif // _MSC_VER >= 1000
    typedef enum {FONTS} STYLE; //Why have I enumerated, Cos, Maybe I might want something other than Fonts here
    class COwnerDrawCombo : public CComboBox
    // Construction
    public:
    COwnerDrawCombo();
    COwnerDrawCombo (STYLE);
    // Attributes
    public:
    void SetHilightColors (COLORREF hilight,COLORREF hilightText)
    m_clrHilight = hilight;
    m_clrHilightText = hilightText;
    void SetNormalColors (COLORREF clrBkgnd,COLORREF clrText)
    m_clrNormalText = clrText;
    m_clrBkgnd = clrBkgnd;
    static BOOL CALLBACK EnumFontProc (LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData);
    void FillFonts ();
    int GetSelFont (LOGFONT&);
    // Operations
    public:
    // Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CCustComboBox)
    public:
    virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
    virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
    protected:
    virtual void PreSubclassWindow();
    //}}AFX_VIRTUAL
    // Implementation
    public:
    virtual ~COwnerDrawCombo();
    // Generated message map functions
    protected:
    STYLE m_enStyle;
    COLORREF m_clrHilight;
    COLORREF m_clrNormalText;
    COLORREF m_clrHilightText;
    COLORREF m_clrBkgnd;
    BOOL m_bInitOver;
    void DrawDefault (LPDRAWITEMSTRUCT);
    void DrawFont(LPDRAWITEMSTRUCT);
    void InitFonts ();
    //{{AFX_MSG(CCustComboBox)
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnDestroy();
    //}}AFX_MSG
    afx_msg long OnInitFonts (WPARAM, LPARAM);
    DECLARE_MESSAGE_MAP()
    //{{AFX_INSERT_LOCATION}}
    // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
    #endif //!defined(AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_)
    // OwnerDrawCombo.cpp : implementation file
    #include "stdafx.h"
    #include "combobox.h"
    #include "OwnerDrawCombo.h"
    #ifdef _DEBUG
    #define new DEBUG_NEW
    #undef THIS_FILE
    static char THIS_FILE[] = __FILE__;
    #endif
    #define WM_INITFONTS (WM_USER + 123)
    //I chose 123 cos nobody might use the same exact number.. I can improve this by use RegisterWindowMessage..
    // COwnerDrawCombo
    //Initial values of the text and highlight stuff
    COwnerDrawCombo::COwnerDrawCombo()
    m_enStyle = FONTS;
    m_clrHilight = GetSysColor (COLOR_HIGHLIGHT);
    m_clrNormalText = GetSysColor (COLOR_WINDOWTEXT);
    m_clrHilightText = GetSysColor (COLOR_HIGHLIGHTTEXT);
    m_clrBkgnd = GetSysColor (COLOR_WINDOW);
    m_bInitOver = FALSE;
    COwnerDrawCombo::COwnerDrawCombo (STYLE enStyle)
    m_enStyle = enStyle;
    m_clrHilight = GetSysColor (COLOR_HIGHLIGHT);
    m_clrNormalText = GetSysColor (COLOR_WINDOWTEXT);
    m_clrHilightText = GetSysColor (COLOR_HIGHLIGHTTEXT);
    m_clrBkgnd = GetSysColor (COLOR_WINDOW);
    m_bInitOver =FALSE;
    COwnerDrawCombo::~COwnerDrawCombo()
    BEGIN_MESSAGE_MAP(COwnerDrawCombo, CComboBox)
    //{{AFX_MSG_MAP(COwnerDrawCombo)
    ON_WM_CREATE()
    ON_WM_DESTROY()
    //}}AFX_MSG_MAP
    ON_MESSAGE (WM_INITFONTS,OnInitFonts)
    END_MESSAGE_MAP()
    // COwnerDrawCombo message handlers
    void COwnerDrawCombo::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
    //I might want to add something else someday
    switch (m_enStyle)
    case FONTS:
    DrawFont(lpDrawItemStruct);
    break;
    //I dont need the MeasureItem to do anything. Whatever the system says, it stays
    void COwnerDrawCombo::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
    void COwnerDrawCombo::DrawFont(LPDRAWITEMSTRUCT lpDIS)
    CDC* pDC = CDC::FromHandle(lpDIS->hDC);
    CRect rect;
    TRACE0 ("In Draw Font\n");
    // draw the colored rectangle portion
    rect.CopyRect(&lpDIS->rcItem);
    pDC->SetBkMode( TRANSPARENT );
    if (lpDIS->itemState & ODS_SELECTED)
    pDC->FillSolidRect (rect,m_clrHilight);
    pDC->SetTextColor (m_clrHilightText);
    else
    pDC->FillSolidRect (rect,m_clrBkgnd);
    pDC->SetTextColor (m_clrNormalText);
    if ((int)(lpDIS->itemID) < 0) // Well its negetive so no need to draw text
    else
    CString strText;
    GetLBText (lpDIS->itemID,strText);
    CFont newFont;
    CFont *pOldFont;
    ((LOGFONT*)lpDIS->itemData)->lfHeight = 90; //9 point size
    ((LOGFONT*)lpDIS->itemData)->lfWidth = 0;
    newFont.CreatePointFontIndirect ((LOGFONT*)lpDIS->itemData);
    pOldFont = pDC->SelectObject (&newFont);
    pDC->DrawText(strText, rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
    pDC->SelectObject (pOldFont);
    newFont.DeleteObject ();
    void COwnerDrawCombo::InitFonts ()
    CDC *pDC = GetDC ();
    ResetContent (); //Delete whatever is there
    EnumFonts (pDC->GetSafeHdc(),NULL,(FONTENUMPROC) EnumFontProc,(LPARAM)this);//Enumerate
    m_bInitOver = TRUE;
    BOOL CALLBACK COwnerDrawCombo::EnumFontProc (LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData)
    if (dwType == TRUETYPE_FONTTYPE) //Add only TTF fellows, If you want you can change it to check for others
    int index = ((COwnerDrawCombo *) lpData)->AddString(lplf->lfFaceName);
    LPLOGFONT lpLF;
    lpLF = new LOGFONT;
    CopyMemory ((PVOID) lpLF,(CONST VOID *) lplf,sizeof (LOGFONT));
    ((COwnerDrawCombo *) lpData)->SetItemData (index,(DWORD) lpLF);
    return TRUE;
    int COwnerDrawCombo::OnCreate(LPCREATESTRUCT lpCreateStruct)
    if (CComboBox::OnCreate(lpCreateStruct) == -1)
    return -1;
    // TODO: Add your specialized creation code here
    if (m_enStyle == FONTS)
    //SetItemHeight(-1,30);
    PostMessage (WM_INITFONTS,0,0);
    return 0;
    long COwnerDrawCombo::OnInitFonts (WPARAM, LPARAM)
    InitFonts ();
    return 0L;
    void COwnerDrawCombo::OnDestroy()
    if (m_enStyle == FONTS)
    int nCount;
    nCount = GetCount ();
    for (int i = 0; i < nCount; i++)
    delete ((LOGFONT*)GetItemData (i)); //delete the LOGFONTS actually created..
    // TODO: Add your message handler code here
    CComboBox::OnDestroy();
    void COwnerDrawCombo::FillFonts ()
    m_enStyle = FONTS;
    PostMessage (WM_INITFONTS,0,0); //Process in one place
    int COwnerDrawCombo::GetSelFont (LOGFONT& lf)
    int index = GetCurSel ();
    if (index == LB_ERR)
    return LB_ERR;
    LPLOGFONT lpLF = (LPLOGFONT) GetItemData (index);
    CopyMemory ((PVOID)&lf, (CONST VOID *) lpLF, sizeof (LOGFONT));
    return index; //return the index here.. Maybe the user needs it:-)
    void COwnerDrawCombo::PreSubclassWindow()
    // TODO: Add your specialized code here and/or call the base class
    //Tried to do what Roger Onslow did for the button.. Did not work..?? Any R&D guys around :-)
    Can anyone please let me know how can I achieve this.
    Any help can be appreciated.
    Thanks in advance
    SivaV

    Hi sivavuyyuru,
    I cannot find a easy way to make this.
    I think you may need to draw your own Combo Box control. And you could change the edit control more like static text. Check the article:
    http://www.codeguru.com/cpp/controls/combobox/fontselectioncombos/article.php/c1795/Owner-Drawn-Font-Selection-Combobox.htm
    In the resource editor, Owner draw -> variable , Has string->true, type->drop list.
    The result:
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I Left Align text in the Marker Arrangement tabs?

    It would make it easier to read the heading text of the Arrangement Marker tabs if they were Left Aligned when the project is minimised.
    Is there any way of setting this up or is it a default?

    I'm not aware of a way to make Firefox hide the first tab instead of the last tab; maybe there is an add-on with that feature.
    There is a hidden setting to open the new tab at the end of the bar instead of next to the page you're reading. Then, of course, you won't have this problem. Instead, you'll have the problem that it's hard to figure out which tab had that link in it. In case you want to try it out, here's how.
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the search box above the list, type or paste '''tabs''' and pause while the list is filtered
    (3) Double-click the '''browser.tabs.insertRelatedAfterCurrent''' preference to switch it from true to false (it should turn bold)
    You're done here. You can keep it open in case you hate the change and watch to switch it right back. In that case, double-click again to switch it back to true.

  • How do I write a text below the Lower Third line, in Adobe Premiere Elements 12?

    How do I write a text below the Lower Third line, in Adobe Premiere Elements 12?

    Ruth Schreiber
    To what Premiere Elements 12 title template (lower 3rd type) are you referring?
    It is not clear what you want to do.
    a. Are you able to double click the template to open it in the program's Titler?
    b. Can you select the present text with the Selection Tool to move it to custom locations?
    c. Can you edit the existing text in the template?
    The following uses the Aquarium lower 3rd template...where do you want to write text in the template?
    We will be looking forward to your follow up.
    Thanks.
    ATR

  • How to get the display name of the dropdownlist?

    How can i get the display name of the dropdownlist.
    I want to have value as other data not the same as display name.
    In that case is there any easy way to get the display name of the selection from the dropdownlist.

    I usually just use a hashmap to store the value and label, if I want to retrieve the label again later.
              HashMap bleh = new HashMap();
              bleh.put(dropDownValue, "Drop Down Label"); //Item value (any object), Item Label (String)
              Iterator it = bleh.keySet().iterator();
              while (it.hasNext()) {
                   Object key = it.next();
                   SelectItem selectItem = new SelectItem(key, bleh.get(key));
              //And then later, when you want to retrieve the label
              bleh.get(itemValue); //The item value of the label you wantThe value is easy to get because the selected item(s) from the list will be set to the value(s) the user selected. You should have a getter in your bean for that.
    CowKing
    Message was edited by:
    IamCowKing

  • I use Mail. How do I attach a file as an icon rather than showing the full text in the message?

    I use Mail for my email messages. How do I attach a file as an icon rather than showing the full text in the message box?

    Glad you got it working! Incidentally, if you have a relatively new Apple mouse (Magic Mouse or Mighty Mouse should work), you should be able to enable right-click, if you'd like it, by going to System Preferences - Mouse - and turning on "Secondary click". Third-party mice, like Logitech or Microsoft, should have right-click automatically.
    Matt

Maybe you are looking for

  • Integration around "Marked for Delete" customers (ECC to C4C using PI)

    How does the integration work around "Marked for Deletes" between ECC and C4C customers ? 1. If the customer is marked for delete in ECC, I would assume this markes the C4C account's obsolete flag. 1a.    What happens if ECC undeletes the customer in

  • Prallel query and Delete statements

    Hi Gurus, need your help in understanding parallel execution We are noticing that delete statements are executing very slowly when parallel query is forced. Is this expected? All the literature that I read says that parallel query has no impact on DM

  • Profile issue with character 'u00E1'

    Djuring the registration I wrote my name which contents character 'á', but the system erased 'á' and the fallowing character. From 'János Apáti' made: 'Jos Api'. After that I changed in my frofile my name and used no 'á' just 'a' characters. But my n

  • Nav buttons + borders + hover

    How do I get the 2 px border I have around my navigation buttons to change color on mouse over? On the site I'm building I have a hover set for links, but this doesn't do it. I somehow managed to get the border to hover on the nav buttons on 1 of my

  • Using the new Pages 5. Why do I need to compress a document when sending by email?

    I have just started using Pages 5 and apart from the fact that unless other users have updated to the new version they cannot open the document. First time this has happened with me using Apple software. Happened all the time with windows. Why do pag