Wednesday, April 13, 2011

How can I convert HTML characters to their equivalents on the iPhone?

I want to convert:

<?xml version="1.0"?>
  <Company>
    <CompanyId>5</CompanyId>
    <Name>Acme Inc.</Name>
  </Company>

To:

<?xml version="1.0"?>
  <Company>
    <CompanyId>5</CompanyId>
    <Name>Acme Inc.</Name>
  </Company>

on a iPhone. But I can't find any standard functions available on the iPhone, nor could I find any mature (open source) libraries.

From stackoverflow
  • Will CFXMLCreateStringByUnescapingEntities work for you?

    Gabriƫl : Partly, since this requires some manual coding of the character equivalents.
  • CFXMLCreateStringByUnescapingEntities works OK on the simulator but not on the device.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.