views:

47

answers:

2

I am a new objective-c/iPhone developer and am wondering if there is any way to embed formatting tags into a string in plist?

I have a plist that is an array of dictionaries. Each dictionary contains a few string objects, some of which I would like to contain lists and paragraphs of information.

Is there any way to embed tags like < li>< /li> or < b>< /b> into an string that will be recognized? If there is a way to do this, any reference to which tags are accepted would be greatly appreciated.

I have tried embedding these into the string from the xcode plist editor, tried using PlistEdit Pro, and also tried editing the xml, but have not had any luck so far!

Thanks in advance for your help.

+3  A: 

Yes; you need to use XML entities:

&lt;li&gt;, etc.

You should be able to add them in (raw) in Property List Editor, though (they should be saved out as their entities in the actual XML plist).

Wevah
A: 

@Wevah is correct: you do this by using XML entities. However, if you're programmatically using the built-in plist stuff (writing a plist object to a file, NSPropertyListSerialization, etc), then it will do the xml entity conversion for you.

Dave DeLong