html code appears in my text view in RSS feed app - iphone

i got an rss feed app. All is working ok apart from the fact that in my "description" textView
(detail of the rss) the text appears in html!
any ideas in what is going on?
thanks!

i have found the solution using a wbview with loadHTMLString.
however i would like to ask what is the difference between these two rss feeds:
http://newsrss.bbc.co.uk/rss/sportonline_world_edition/front_page/rss.xml
and this for example:
http://feeds.feedburner.com/pitsirikos/uPfN
in the first one i can get the textview to display the contents as they should appear while in the second one i get html code in the textview!
my code remains the same in both cases...

The key difference between them is that the latter contains prefix tags
e.g. and
Do you use NSXMLParser or libxml2 ? are you doing a strcmp with the element name ?

Related

TinyMCE get form content without using submit button

I'm trying to put TinyMCE on my website. I figured out how to get it to show up, but I'm lost on how to process the content. In their example, they just have a link that references the top of the page and clicking on it somehow magically causes their dump.php script to execute. I don't understand what's going on here. Here is the link:
http://www.tinymce.com/tryit/basic.php
The "Submit" button at the bottom is really a link in a span element with href="#". The form action is dump.php. I want to know how they configured this to run without an actual submit button. Any help in understanding this is greatly appreciated!
To Get Content From Tinymce You Can Use GetContent Method of Currently ActiveEditor Instance
tinyMCE.activeEditor.getContent();
method is used to getting Content .. to Set The Content
tinyMCE.activeEditor.setContent("I Want Text To Be in Tinymce");
to find a perticular element in tinymce get body and find element
var body = tinyMCE.activeEditor.getBody();
$(body).find("#elem_id")
to get a full html
tinyMCE.activeEditor.getDoc().documentElement.innerHTML
hope that helps ..
Since I use PHP, I found this which is also useful:
http://www.tinymce.com/wiki.php/TinyMCE3x:How-to_implement_TinyMCE_in_PHP

Substring certain parts of text from an NSString

I am working at revamping some previous blog apps. I parse the XML, but so far, when a table view cell is clicked, I just have it open the URL for the article that was clicked by the user. This is beginning to get frowned upon by Apple, and I need to change it anyways, so I can gain some more options with display. The entire article is displayed with this tag:
<content:encoded>
I am able to get the data from within this tag, but there are a couple issues. It always starts off with
<![CDATA[<p>
And ends with
</p>]]>
As you can see, it also contains not true text but code, such as
<p> and </p> and aren’t &#8220
Any suggestions for how I can parse this to remove the beginning and ends of the string, and convert to all true text that I can load in my view?

Text Only Detail View From RSS Parser

I'm new with the objective-c programming, but so far i manage to do a custom splitview which parse an rss link of news list in tableview on the rootview. When the link selected it will open the url in detailed view.The problem is i can only show the full html in uiwebview. What i want is that the detail view to display only text and the image (just like the BBC-News app), I tried the stringWithContentsOfURL and stripped the html tag, but it display the whole string from head to footer. I just wanted the body content. Is there anyway i can achieve that? Thanks in advance.
If you use the XMLParser then you should apply didStartElement method use this method and make a check for what ever part you want with simple syntax
if([elementName isEqualToString:#"body"])
use this type of if/else check to refine what ever that you want and save in an array according to your data Class then when you retrive data at the time of detail view use this array and tie with particular data whatever you want to show in your details view.
Like:-
label.text = array.title;
Hope this will help you...

if rss feed has only one item how to go straight to its detail view without using a table

I have an rss feed with only one item in it.I am trying to go straight to showing its details without having to go through a table view to do it.
I have a different rss feed working in my app that has multiple items. I have this working with a table view.I was looking online and all I could find was how to display a feed through a table view.
Does anyone know how to display the singular item from the feed in an app?
or of any online tutorials?
Any and all help much appreciated.
Just parse the feed and insted of showing in tableview ,show it in a label or textview .
I don't understand what u trying to ask through your question. It sounds simple but can you elaborate or give url of Rss feed links for understaning ur query...
If you've parsed your data already, you have it stored in a set of variables, right?
So now you just want a particular data to display in detail view for this if you use (UIWebView for DetailView) used this or a particular you wish to publish in the details view:-
– loadHTMLString:baseURL:
Sets the main page content and base URL.
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
Parameters
string
The content for the main page.
baseURL
The base URL for the content.
k...

how to diplay message that no result found in uitableview. Iphone

I am sending argument in xml feed from search bar to php page.
now what i want to do is to display no result found in table view if no match found against that argument....
Can any body tell how to do. that....
If you use a UISearchDisplayController it will display the message automatically when zero results are found. It also does a couple of other nice things.