Parse an URL

Hi,
How to parse the URL and find out the specified string? I am using the following URL:
http://localhost/livelink/livelink.exe?func=ll&objId=28277&objAction=browse&sort=name
I need to get objid=28277. I tried using StringTokenizer class. But I am only getting objid.
Here is my code:
          StringTokenizer st = new StringTokenizer("objId");
          while (st.hasMoreTokens()) {
          System.out.println(st.nextToken());
Please let me know.
Thanks

Have you tried the URL class.
It does this sort of thing.

Similar Messages

  • Parsing the URL

    Hello Friends,
    I have couple of JSP pages. The URL for each of the Jsp page shown in browser looks somelike as follows.
    http://order.xyz.com/?p_mycode=2Mon_Fr&mnid=in_ss_ppo_hino_soos
    What I want ti achieve is as follows:--
    In my Jsp page, I should be able to grab above URL and then be able to parse the URL for parameternames and parametervalues and put it in Hashmap (cause i want to send these bunch of parameters to next pages VIA session)
    So for example above URL after parsing will give me a Hashmap containing URL parameters as follows :--
    p_mycode ------- 2Mon_Fr
    mnid ---------- in_ss_ppo_hino_soos
    Can any one help me here. have done similar thing before ?
    a>How to grab the URL in the Jsp page ?
    b>How to parse URL to get name  ---   value parameters in the Haspmap (number of URL parameters are dynamically changing. Meaning one Jsp page may have 2 parameters other page may have 7 parameters)
    c>How to pass the haspmap in session ?
    Code snippet will help !
    thanks,
    pp

    Please don't crosspost.
    [http://forums.sun.com/thread.jspa?threadID=5354949]

  • Parsing the URL components

    hi all!
    this is reated to the agent in ICWC interacting with the customer .Agent/System marks the transaction status to complete, This triggers a action profile  to send survey request to the customer
    Customer receives the survey request.
    Customer choses to take survey and clicks on the URL
         1) PBO is triggered.
              Parse the URL components give above name value pairs/parameters.
    now  my ques is how to parse the URL components?
    waitin for answers
    sachin

    You need to get the data from the event handler.
    Here is a working example that gets some xml data via a url:
    Note that any one who then wants the data must listen for the
    appParms event
    dispatched in the complete handler.
    In this example the caller (my main flex application) invokes
    the load parms.
    The even handler when invoked proceeds with initialization
    using the parms loaded.
    Remember that Flex is asynchronous so your try/catch will not
    work
    and you really don't know when the response will come back to
    the event handler. You will find that in genearl linear style
    programming will not work in flex since actionscript just trundles
    along and does not wait.
    doLoadRequest(appUrl:String):void
    var request:URLRequest = new URLRequest(appUrl);
    var variables:URLLoader = new URLLoader();
    variables.dataFormat = URLLoaderDataFormat.TEXT;
    // completeHandler get invoked.
    variables.addEventListener(Event.COMPLETE, completeHandler);
    variables.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
    variables.load(request);
    private function completeHandler(event:Event):void
    if(event.currentTarget.data == null)
    ExceptionManager.getInstance().getHandlerResponse("default","The
    Application Parms Handler is empty");
    return;
    parms = new XML(event.currentTarget.data);
    logAPH.info("Inside completeHandler(event:Event) :"+parms);
    dispatchEvent(new SimpleEvent("appParms","1"));
    }

  • [svn:osmf:] 17757: Fix FM-1055: Parsing of URLs with leading or trailing whitespace is incorrect.

    Revision: 17757
    Revision: 17757
    Author:   [email protected]
    Date:     2010-09-17 16:20:09 -0700 (Fri, 17 Sep 2010)
    Log Message:
    Fix FM-1055: Parsing of URLs with leading or trailing whitespace is incorrect.  We now trim such whitespace for all URLs.  Added unit tests at various levels to catch these.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-1055
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/dvr/DVRCastNetLoader.as
        osmf/trunk/framework/OSMF/org/osmf/utils/URL.as
        osmf/trunk/framework/OSMFTest/org/osmf/net/TestNetStreamUtils.as
        osmf/trunk/framework/OSMFTest/org/osmf/utils/TestURL.as

    Revision: 17757
    Revision: 17757
    Author:   [email protected]
    Date:     2010-09-17 16:20:09 -0700 (Fri, 17 Sep 2010)
    Log Message:
    Fix FM-1055: Parsing of URLs with leading or trailing whitespace is incorrect.  We now trim such whitespace for all URLs.  Added unit tests at various levels to catch these.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-1055
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/dvr/DVRCastNetLoader.as
        osmf/trunk/framework/OSMF/org/osmf/utils/URL.as
        osmf/trunk/framework/OSMFTest/org/osmf/net/TestNetStreamUtils.as
        osmf/trunk/framework/OSMFTest/org/osmf/utils/TestURL.as

  • Parse the URL column to get data after 5th "/"

    Hi All,
    I have a url column that i need to parse to get the data after 5th Slash. can anyone help me here.
    Table : URLData
    url
    http://www.abc.com/OurJourneys/Ourlife/the-Great-Explorers/dp
    http://www.abc.com/OurJourneys/Ourlife/Times-new-time/OurJourneys.aspx year=2015&region=Antaica&type=Sl
    http://www.abc.com
    I result should be below data
    the-Great-Explorers
    Times-new-time
    Any help would be much appreciated

    The code you gave me works fine but it always gets me second last position.
    http://www.abc.com/OurJourneys/Ourlife/the-Great-Explorers/dp
    http://www.abc.com/OurJourneys/Ourlife/Times-new-time/OurJourneys.aspx
    year=2015&region=Antaica&type
    http://www.abc.com
    what if i want to get 3rd last position.
    http://www.abc.com/OurJourneys/Ourlife/the-Great-Explorers/dp
    http://www.abc.com/OurJourneys/Ourlife/Times-new-time/OurJourneys.aspx
    year=2015&region=Antaica&type
    http://www.abc.com
    Can you help me to get code for that.

  • Parse the URL components !

    hi all !
    Is there any function module which can parse the survey URL components so that i can use it in PBO for some functionalities.
    regards
    sachin

    Have you tried: HTTP_PARSE_URL?

  • PLXML: How to parse given url ?

    Hi,
    I'am working with the XML parser for PL/SQL on NT.
    According to your Parser API documentation it is possible
    to parse a given url, too:
    Parses xml stored in the given url/file and returns
    the built DOM DocumentNow, parsing from file works fine, but any form of url
    raises
    ORA-29532: ... java.io.FileNotFoundException
    Can you help me ? Can you give an example of a call ?
    Are there prerequisites I have to think of ?
    Thanks for the help
    Franz
    null

    Franz Bezold (guest) wrote:
    : Hi,
    : I'am working with the XML parser for PL/SQL on NT.
    : According to your Parser API documentation it is possible
    : to parse a given url, too:
    : > Parses xml stored in the given url/file and returns
    : > the built DOM Document
    : Now, parsing from file works fine, but any form of url
    : raises
    : ORA-29532: ... java.io.FileNotFoundException
    : Can you help me ? Can you give an example of a call ?
    : Are there prerequisites i have to think of ?
    : Thanks for the help
    : Franz
    To access external URLs, you need set up your proxy host and
    port. FOr example using this type of syntax:
    java -Dhttp.proxyHost=myproxy.mydomain.com -Dhttp.proxyPort=3182
    DOMSample myxml.xml
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Parsing FMS URLs with Tokenization

    I'm building the player on an app that has tokenization implemented on the net connection that looks something like this:
    Net Connection: rtmpe://subdomain.domain.com/vod/?auth=SoMeToKeNkEy&aifp=v001&slist=Video/
    Video: Video/myVideo
    Combined: rtmpe://subdomain.domain.com/vod/?auth=SoMeToKeNkEy&aifp=v001&slist=Video/Video/myVideo
    or more accurately from my SMIL (that I'll probably need to parse)
    Combined in SMIL: rtmpe://subdomain.domain.com/vod/?auth=SoMeToKeNkEy&aifp=v001&slist=Video/<brea k>Video/myVideo
    I've been trying to figure out how to get something like this to play in OSMF. With OVP I was able to provide these guys as two separate values to make the connection, but I haven't seen a good way to do that in OSMF. URLResource only takes one parameter, which would be the combined string. When I try passing it that way, the URL gets improperly broken up at /vod/ instead of after the query. I see that there is/was an FMSURL class, but I haven't figured out how to actually implement it, and even if I do, it still appears to only take the 1 param.
    Any suggestions? Thanks in advance!

    Hi,
    This should work fine since the connection logic in OSMF passes all query params.  That looks like an Akamai token and slist, but this will play fine without the Akamai plugin loaded since it's a vod stream.  Take a look at the AkamaiPluginSample Flex app, it loads and plays a stream with a connection auth token in the query string.
    - charles

  • Parsing the URL of all images from Google Images html file

    Hello all,
    I am trying to pull all the image URL's from a html file. I have used URLConnection class to copy the follwing link
    http://images.google.com/images?q=tiger&gbv=2&svnum=10&hl=en&start=21&sa=N&ndsp=21
    into a html file in my local drive. Now this file has the URL's of the images that have been displayed by google images (searched for: tiger). Now I need to fetch up those image URL's.
    any ideas???

    Thank you for the reply.
    I am beginner. Can you please eloborate the explanation or do u have some code examples.
    thank you very much

  • How do I parse a web page via a URL in the clipboard

    Hi.
    I would like to read the html source of a web page into a string variable. The contents of the clipboard contains the URL.
    How do I do this ?
    Regards,
    Harry W.
    PowerMac G5 Dual 2.5GHz   Mac OS X (10.4.3)  

    What I have done is write an Applescript that parses a URL copied from a web site (http://www.ebroadcast.com.au/TV/static/PerthNight.html?) read the web page using CURL and use the EyeTV API to schedule a recording.
    The applescript is as follows;
    property |version| : 1.0
    property author : "HarPat Software"
    property |date| : date "Saturday, 18 February 2006 12:00:00 AM"
    property license : "freeware, open-source"
    version 1.0, February, 18, 2006
    - Initial version.
    set theURL to contents of (get the clipboard) as text
    if theURL contains "http://www.ebroadcast.com.au/cgi-bin/TV/detail?" then
    set thePage to do shell script "curl " & quoted form of theURL
    set theBDateStr to "Broadcast Date: "
    set theChannelStr to "&chan="
    set theDescriptionStr to "&descrip="
    set theBTimeStr to the offset of "Broadcast Time: " in thePage
    set theDurationStr to the offset of "Timeslot Duration: " in thePage
    set theBDateOff to the offset of theBDateStr in thePage
    copy (characters (theBDateOff + (length of theBDateStr)) thru ((the offset of "Channel: " in thePage) - 9) of thePage) as string to theBroadcastDate
    set theChannelOff to the offset of theChannelStr in theURL
    copy (characters (theChannelOff + 6) thru ((the offset of "&state=" in theURL) - 1) of theURL) as string to theChannel
    set theDescriptOff to the offset of theDescriptionStr in theURL
    copy (characters (theDescriptOff + 9) thru ((the offset of "&fta=" in theURL) - 1) of theURL) as string to theTitle
    set theBTimeOff to the offset of theBTimeStr in thePage
    copy (characters (theBTimeOff + (length of theBTimeStr) + 23) thru ((the offset of "Classifications: " in thePage) - 10) of thePage) as string to theBroadcastTime
    set theDurationOff to the offset of theDurationStr in thePage
    copy (characters (theDurationOff + (length of theDurationStr) + 26) thru ((the offset of "<!--<br>" in thePage) - 11) of thePage) as string to theDuration
    set Durationsecs to (theDuration as integer) * 60
    set thetheBroadcastDateTime to theBroadcastDate & " " & theBroadcastTime
    set aChannel to 0
    if theChannel = "2" then
    set aChannel to 1
    end if
    if theChannel = "7" then
    set aChannel to 2
    end if
    if theChannel = "9" then
    set aChannel to 3
    end if
    if theChannel = "10" then
    set aChannel to 4
    end if
    if theChannel = "SBS" then
    set aChannel to 5
    end if
    if theChannel = "31" then
    set aChannel to 6
    end if
    tell application "EyeTV"
    make new program with properties {start time:date thetheBroadcastDateTime, duration:Durationsecs, title:theTitle, channel number:aChannel}
    end tell
    end if
    I'm not very good at scripting yet so please don't laugh at my code.
    Regards,
    Harry Werkman

  • URL parsing

    Hello Friends,
    I have couple of JSP pages. The URL for each of the Jsp page shown in browser looks somelike as follows.
    http://order.xyz.com/?p_mycode=2Mon_Fr&mnid=in_ss_ppo_hino_soos
    What I want ti achieve is as follows:--
    In my Jsp page, I should be able to grab above URL and then be able to parse the URL for parameternames and parametervalues and put it in Hashmap (cause i want to send these bunch of parameters to next pages VIA session)
    So for example above URL after parsing will give me a Hashmap containing URL parameters as follows :--
    p_mycode ------- 2Mon_Fr
    mnid ---------- in_ss_ppo_hino_soos
    Can any one help me here. have done similar thing before ?
    a>How to grab the URL in the Jsp page ?
    b>How to parse URL to get name  ---   value parameters in the Haspmap (number of URL parameters are dynamically changing. Meaning one Jsp page may have 2 parameters other page may have 7 parameters)
    c>How to pass the haspmap in session ?
    Code snippet will help !
    thanks,
    pp

    When you say "in my JSP page" does that mean you want the JSP code in that page to do something when it's executed? Or did you have in mind the output of the JSP which is in the browser? Or did you want something else to look in the source code of the JSP?
    And when you said "grab" a URL, exactly where is that URL coming from? (Follow-up questions to that depend on the answers to the previous questions.)
    Edit: my best guess is that the URL in question is the one that requests the JSP. In that case you haven't read any tutorials or other educational material about JSP and you don't understand that you're just asking for the request parameters, which your server has already put into a Map for you. But surely that can't be right.

  • Parse url

    Hi all,
    I am looking for some example code on how to select out certain data from a URL and save to a text file. I can easily save the entire page to a text file but I only need some of the data- for example, the information between tag �A� and tag �B�?
    Much thanks in advance!
    Alex

    so what you want is not parsing an URL, but parse html content and save it...
    anyway, use some kind of html parsing liibrary... like htmlparser - http://htmlparser.sourceforge.net/

  • Parse an "inputted" url string

    I am simply trying to parse a URL for a particular value
    without going through len(), left(), right(), findnocase() hell.
    Can anyone please tell me how? I feel like I'm missing some obvious
    function.
    Example:
    I only want the value of (v).
    http://www.youtube.com/watch?v=wHMZa7Qb8XI&feature=yva-title

    if v is always the first parameter in the query string, then
    you can use
    cf list functions to get its value:
    <cfset url = "
    http://www.youtube.com/watch?v=wHMZa7Qb8XI&feature=yva-title">
    <cfset v_value = listgetat(url, 2, "=")>
    if it is in varying positions in the query string, you'll
    need a regexp
    to get its value. i am not big on regexp, so will let someone
    else chime
    in with correct code...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Parsing url from HTML file

    hello
    I have a html page converted to text format. I need to parse the url's present in that file.
    I got all the url's but I want to extract only a specific url i.e., url in the anchor tag
    e.g., like <a href = "http://www.java.sun.com"> Java </a>
    In that file, if I need only the url in the anchor tag... what would be the method ?
    Any help would be great
    Thanks in advance
    k

    Thank you very much for your prompt reply and for the link u have provided.

  • Couldn't parse image from XML file using NSXMLParser

    Hi all, Since i am newbie to developing iPhone application, i have problem in parsing XML data.
    I use the following code for parsing XML file, this is RootViewController.h file
    #import <UIKit/UIKit.h>
    #import "SlideMenuView.h"
    #define kNameValueTag 1
    #define kColorValueTag 2
    #define kSwitchTag 100
    @class DetailViewController;
    @interface RootViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> {
    DetailViewController *detailViewController;
    UITableView *myTable;
    UIActivityIndicatorView *activityIndicator;
    UIButton *btn;
    CGSize cellSize;
    NSXMLParser *rssParser;
    NSMutableArray *stories;
    NSMutableDictionary *item;
    NSString *currentElement;
    NSMutableString *currentTitle, *currentDate, *currentSummary, *currentLink, *currentImage;
    SlideMenuView *slideMenu;
    NSMutableArray *buttonArray;
    UIButton *rubic;
    UIButton *buurt;
    UIButton *beeld;
    UILabel *lbl;
    NSString *url;
    @property (nonatomic, retain) UITableView *myTable;
    @property (nonatomic, retain) DetailViewController *detailViewController;
    @property (nonatomic, retain) SlideMenuView *slideMenu;
    @property (nonatomic, retain) UIButton *btn;
    @property (nonatomic, retain) NSMutableArray *buttonArray;
    @property (nonatomic, retain) UIButton *rubic;
    @property (nonatomic, retain) UIButton *buurt;
    @property (nonatomic, retain) UIButton *beeld;
    @property (nonatomic, retain) UILabel *lbl;
    @end
    below is the RootViewController.m file,
    #import <Foundation/Foundation.h>
    #import "RootViewController.h"
    #import "DetailViewController.h"
    #import "SlideMenuView.h"
    @implementation RootViewController
    @synthesize rubic, buurt, beeld, detailViewController, myTable, btn, buttonArray, slideMenu, lbl;
    - (void)parseXMLFileAtURL:(NSString *)URL {
    stories = [[NSMutableArray alloc] init];
    //you must then convert the path to a proper NSURL or it won't work
    NSURL *xmlURL = [NSURL URLWithString:URL];
    // here, for some reason you have to use NSClassFromString when trying to alloc NSXMLParser, otherwise you will get an object not found error
    // this may be necessary only for the toolchain
    rssParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL];
    // Set self as the delegate of the parser so that it will receive the parser delegate methods callbacks.
    [rssParser setDelegate:self];
    // Depending on the XML document you're parsing, you may want to enable these features of NSXMLParser.
    [rssParser setShouldProcessNamespaces:NO];
    [rssParser setShouldReportNamespacePrefixes:NO];
    [rssParser setShouldResolveExternalEntities:NO];
    [rssParser parse];
    - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError {
    NSString * errorString = [NSString stringWithFormat:@"Unable to download story feed from web site (Error code %i )", [parseError code]];
    NSLog(@"error parsing XML: %@", errorString);
    UIAlertView * errorAlert = [[UIAlertView alloc] initWithTitle:@"Error loading content" message:errorString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [errorAlert show];
    - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict{
    //NSLog(@"found this element: %@", elementName);
    currentElement = [elementName copy];
    if ([elementName isEqualToString:@"item"]) {
    // clear out our story item caches...
    item = [[NSMutableDictionary alloc] init];
    currentTitle = [[NSMutableString alloc] init];
    currentDate = [[NSMutableString alloc] init];
    currentSummary = [[NSMutableString alloc] init];
    currentLink = [[NSMutableString alloc] init];
    currentImage = [[NSMutableString alloc] init];
    - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{
    //NSLog(@"ended element: %@", elementName);
    if ([elementName isEqualToString:@"item"]) {
    // save values to an item, then store that item into the array...
    [item setObject:currentTitle forKey:@"title"];
    [item setObject:currentSummary forKey:@"summary"];
    [item setObject:currentDate forKey:@"date"];
    [item setObject:currentImage forKey:@"enclosure"];
    [stories addObject:[item copy]];
    NSLog(@"adding story: %@", currentTitle);
    - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{
    //NSLog(@"found characters: %@", string);
    // save the characters for the current item...
    if ([currentElement isEqualToString:@"title"]) {
    [currentTitle appendString:string];
    } else if ([currentElement isEqualToString:@"description"]) {
    [currentSummary appendString:string];
    } else if ([currentElement isEqualToString:@"pubDate"]) {
    [currentDate appendString:string];
    } else if ([currentElement isEqualToString:@"enclosure"]) {
    [currentImage appendString:string];
    - (void)parserDidEndDocument:(NSXMLParser *)parser {
    [activityIndicator stopAnimating];
    [activityIndicator removeFromSuperview];
    NSLog(@"all done!");
    NSLog(@"stories array has %d items", [stories count]);
    [myTable reloadData];
    - (void)loadView {
    //self.title = @"GVA_iPhone";
    //UIImage *img = [UIImage imageNamed: @"gva_v2.1.png"];
    CGRect frame = [[UIScreen mainScreen] bounds];
    UIView *aView = [[UIView alloc] initWithFrame:frame];
    aView.backgroundColor = [UIColor grayColor];
    self.view = aView;
    [aView release];
    lbl = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 33.0, 320.0, 30.0)];
    lbl.backgroundColor = [UIColor colorWithRed:21.0/255.0 green:113.0/255.0 blue:194.0/255.0 alpha:1.0];
    lbl.textColor = [UIColor whiteColor];
    lbl.font = [UIFont boldSystemFontOfSize:18.0];
    [self.view addSubview:lbl];
    [lbl release];
    buttonArray = [[NSMutableArray alloc] init];
    for(int i = 1; i < 4; i++)
    // Rounded rect is nice
    //UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    // Give the buttons a width of 100 and a height of 30. The slide menu will take care of positioning the buttons.
    // If you don't know that 100 will be enough, use my function to calculate the length of a string. You find it on my blog.
    [btn setFrame:CGRectMake(0.0f,3.0f, 120.0f, 30.0f)];
    switch(i){
    case 1:
    [btn setTitle:[NSString stringWithFormat:@" Snel", i+1] forState:UIControlStateNormal];
    [btn setBackgroundImage:[UIImage imageNamed:@"topbg02.png"] forState:UIControlStateNormal];
    lbl.text = @" Snel";
    [btn addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
    [buttonArray addObject:btn];
    break;
    case 2:
    [btn setTitle:[NSString stringWithFormat:@" Binnenland", i+1] forState:UIControlStateNormal];
    [btn setBackgroundImage:[UIImage imageNamed:@"topbg02.png"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
    [buttonArray addObject:btn];
    break;
    case 3:
    [btn setTitle:[NSString stringWithFormat:@" Buitenland", i+1] forState:UIControlStateNormal];
    [btn setBackgroundImage:[UIImage imageNamed:@"topbg02.png"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(buttonTouched:) forControlEvents:UIControlEventTouchUpInside];
    [buttonArray addObject:btn];
    break;
    [btn release];
    slideMenu = [[SlideMenuView alloc]initWithFrameColorAndButtons:CGRectMake(0.0, 3.0, 330.0, 30.0) backgroundColor:[UIColor blackColor] buttons:buttonArray];
    [self.view addSubview:slideMenu];
    UITableView *aTableView = [[UITableView alloc] initWithFrame:CGRectMake(0.0, 63.0, 320.0, 310.0)];
    aTableView.dataSource = self;
    aTableView.delegate = self;
    aTableView.rowHeight = 120;
    self.myTable = aTableView;
    [aTableView release];
    [self.view addSubview:myTable];
    rubic = [[UIButton alloc]initWithFrame:CGRectMake(0.0, 370.0, 105.0, 50.0)];
    [rubic setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [rubic setBackgroundImage:[UIImage imageNamed:@"MOUSEOVER.png"] forState:UIControlStateNormal];
    [rubic addTarget:self action:@selector(buttonBinn:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:rubic];
    UILabel *lblRub = [[UILabel alloc]initWithFrame:CGRectMake(10.0, 385.0, 45.0, 12.0)];
    lblRub.text = @"Rubriek";
    lblRub.font = [UIFont boldSystemFontOfSize:11.0];
    lblRub.backgroundColor = [UIColor clearColor];
    lblRub.textColor = [UIColor whiteColor];
    [self.view addSubview:lblRub];
    UIImageView *imgCat = [[UIImageView alloc] initWithFrame:CGRectMake(58.0, 375.0, 39.0, 36.0)];
    imgCat.image = [UIImage imageNamed:@"category_icon.png"];
    [self.view addSubview:imgCat];
    buurt = [[UIButton alloc] initWithFrame:CGRectMake(105.0, 370.0, 108.0, 50.0)];
    [buurt setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [buurt setBackgroundImage:[UIImage imageNamed:@"bottombg01.png"] forState:UIControlStateNormal];
    [buurt addTarget:self action:@selector(buttonBuurt:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:buurt];
    UILabel *lblGlo = [[UILabel alloc]initWithFrame:CGRectMake(112.0, 385.0, 59.0, 12.0)];
    lblGlo.text = @"In de Buurt";
    lblGlo.font = [UIFont boldSystemFontOfSize:11.0];
    lblGlo.backgroundColor = [UIColor clearColor];
    lblGlo.textColor = [UIColor whiteColor];
    [self.view addSubview:lblGlo];
    UIImageView *imgGlo = [[UIImageView alloc] initWithFrame:CGRectMake(173.0, 375.0, 39.0, 36.0)];
    imgGlo.image = [UIImage imageNamed:@"globe_icon.png"];
    [self.view addSubview:imgGlo];
    beeld = [[UIButton alloc]initWithFrame:CGRectMake(213.0, 370.0, 108.0, 50.0)];
    [beeld setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [beeld setBackgroundImage:[UIImage imageNamed:@"bottombg01.png"] forState:UIControlStateNormal];
    [beeld addTarget:self action:@selector(buttonBeeld:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:beeld];
    UILabel *lblCam = [[UILabel alloc]initWithFrame:CGRectMake(228.0, 385.0, 45.0, 12.0)];
    lblCam.text = @"In Beeld";
    lblCam.font = [UIFont boldSystemFontOfSize:11.0];
    lblCam.backgroundColor = [UIColor clearColor];
    lblCam.textColor = [UIColor whiteColor];
    [self.view addSubview:lblCam];
    UIImageView *imgCam = [[UIImageView alloc] initWithFrame:CGRectMake(276.0, 375.0, 39.0, 36.0)];
    imgCam.image = [UIImage imageNamed:@"camera_icon.png"];
    [self.view addSubview:imgCam];
    if([stories count] == 0) {
    [self parseXMLFileAtURL:@"http://iphone.concentra.exuvis.com/feed/rss/article/2/binnenland.xml"];
    cellSize = CGSizeMake([myTable bounds].size.width,60);
    - (IBAction)buttonPressed:(id)sender {
    lbl.text = ((UIButton*)sender).currentTitle;
    - (IBAction)buttonClicked:(id)sender {
    lbl.text = ((UIButton*)sender).currentTitle;
    - (IBAction)buttonTouched:(id)sender {
    lbl.text = ((UIButton*)sender).currentTitle;
    -(void)buttonBinn:(id)sender
    [rubic setBackgroundImage:[UIImage imageNamed:@"MOUSEOVER.png"] forState:UIControlStateNormal];
    [buurt setBackgroundImage:[UIImage imageNamed:@"bottombg01.png"] forState:UIControlStateNormal];
    [beeld setBackgroundImage:[UIImage imageNamed:@"bottombg01.png"] forState:UIControlStateNormal];
    -(void)buttonBuurt:(id)sender
    [buurt setBackgroundImage:[UIImage imageNamed:@"MOUSEOVER.png"] forState:UIControlStateNormal];
    [beeld setBackgroundImage:[UIImage imageNamed:@"bottombg01.png"] forState:UIControlStateNormal];
    [rubic setBackgroundImage:[UIImage imageNamed:@"bottombg01.png"] forState:UIControlStateNormal];
    -(void)buttonBeeld:(id)sender
    [beeld setBackgroundImage:[UIImage imageNamed:@"MOUSEOVER.png"] forState:UIControlStateNormal];
    [rubic setBackgroundImage:[UIImage imageNamed:@"bottombg01.png"] forState:UIControlStateNormal];
    [buurt setBackgroundImage:[UIImage imageNamed:@"bottombg01.png"] forState:UIControlStateNormal];
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
    - (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
    // Release anything that's not essential, such as cached data
    - (void)dealloc {
    [myTable release];
    [detailViewController release];
    [super dealloc];
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return [stories count];
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GVAiPhone"];
    if (cell == nil) {
    //CGRect cellFrame = CGRectMake(0, 0, 300, 65);
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"GVAiPhone"] autorelease];
    //cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    //cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"arrow_icon.png"]];
    CGRect nameValueRect = CGRectMake(5, 5, 275, 35);
    UILabel *nameValue = [[UILabel alloc] initWithFrame:nameValueRect];
    nameValue.tag = kNameValueTag;
    nameValue.font = [UIFont fontWithName:@"Arial" size:15.0];
    nameValue.lineBreakMode = UILineBreakModeWordWrap;
    nameValue.numberOfLines = 2;
    [cell.contentView addSubview:nameValue];
    [nameValue release];
    CGRect colorValueRect = CGRectMake(5, 38, 275, 65);
    UILabel *colorValue = [[UILabel alloc] initWithFrame:colorValueRect];
    colorValue.tag = kColorValueTag;
    colorValue.font = [UIFont fontWithName:@"Arial" size:11.0];
    colorValue.textColor = [UIColor colorWithRed:130.0/255.0 green:135.0/255.0 blue:139.0/255.0 alpha:1.0];
    colorValue.lineBreakMode = UILineBreakModeWordWrap;
    colorValue.textAlignment = UITextAlignmentLeft;
    colorValue.numberOfLines = 6;
    [cell.contentView addSubview:colorValue];
    [colorValue release];
    // Set up the cell
    //cell.text = [theSimpsons objectAtIndex:indexPath.row];
    //cell.hidesAccessoryWhenEditing = YES;
    NSUInteger storyIndex = [indexPath row];
    NSDictionary *rowData = [stories objectAtIndex:storyIndex];
    UILabel *name = (UILabel *)[cell.contentView viewWithTag:kNameValueTag];
    name.text = [rowData objectForKey:@"title"];
    //name.lineBreakMode;
    //UIImage *image =[UIImage imageNamed: currentImage];imageWithContentsOfFile
    //image.size.width = 50;
    //iimage.size.height = 50;
    //cell.image = [UIImage imageNamed:currentImage];
    cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"arrow_icon.png"]];
    UILabel *color = (UILabel *)[cell.contentView viewWithTag:kColorValueTag];
    color.text = [rowData objectForKey:@"summary"];
    return cell;
    @end
    - here the actual problem is the xml node <enclosure> contains images but in using the method "didEndElement" , it doesn't parse into the <enclosure> node. ya so please help me in parsing and getting the image.
    Waiting for your help !!
    -Sathiya

    Hi, how did you solve your problem in detail. I'm having the same problem with this rss-feed: www.spiegel.de/index.rss
    I cannot parse the url of the images. I'm looking forward to your answer.

Maybe you are looking for