On Mon, May 19, 2008 at 11:27 AM, <[EMAIL PROTECTED]> wrote: > Hi, > I want to convert string to its corresponding values.I found a method in > NSAttributedString initWithHtml,i think it will convert HTML to > attributed string.I found 3 attributes > NSString *NSExcludedElementsDocumentAttribute; > NSString *NSTextEncodingNameDocumentAttribute; > NSString *NSPrefixSpacesDocumentAttribute; for generating html ,but How > to use it,I used it with NSDictionary but does not generating HTML code. > > more specific::i want to convert the simple file to html file which > contains <,> and html tags. > > ie,If a ftext ile contains simple word ,, > > "sample", > > then i've to get html file contains,,, > > <html> > <titile></title> > <body> > sample > </body> > <html> > > > I've already posted a question related to my topic.i got 2 responses and > tried it also,but couldn;t create html code.,so if there is a way in cocoa > please suggest me?If i there is no way to create html code for > corresponding file then also reply me.Please help me i'm new to cocoa. I > googled the topic but didin;t get much results for helping me.If u can > give any hint it will really help me. > > Thanks > >
NSString* myTextFileContents = @"sample"; NSString* html = [NSString stringWithFormat:@"<html><title></title><body>%@</body></html>", myTextFileContents]; ? Alternatively, look at NSXMLDocument. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]