문제

I have a simple XML file like this

<?xml version="1.0"?>
<catalog>
    <timezone>
        <name>UTC-11:00</name>
        <place>
            <value>American Samoa</value>
            <value>Samoa</value>
        </place>
    </timezone>
    <timezone>
        <name>UTC-10:00</name>
        <place>
            <value>Honolulu</value>
            <value>Tahiti</value>
        </place>
    </timezone>
</catalog>

What is the canonical/standard way to parse this in iOS? I want to save "names" and "places" for each name.

도움이 되었습니까?

해결책

NSXMLParser is already built in. You should look at this article for a more thorough comparison.

http://www.raywenderlich.com/553/xml-tutorial-for-ios-how-to-choose-the-best-xml-parser-for-your-iphone-project

다른 팁

It is NSXMLParser. Official documentation

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top