【问题标题】:Parsing a XML File in iPhone在 iPhone 中解析 XML 文件
【发布时间】:2012-01-25 09:59:33
【问题描述】:

我需要从网站解析一个 XML 文件。我已经浏览了一些链接,如 ray wenderlich 等,但首先我需要知道 XML 解析是如何工作的。所以我决定解析一个简单的xml文件,如下所示。

<?xml version="1.0" encoding="UTF-8"?>
<employees>
   <emp id = "100" name = "Cyril">
       <details>
          <desc>This Employee is working in this company for the past 5 years
           </desc>
           <age>35</age>
        </details>    
     </emp>
<emp id = "101" name = "Ram">
           <details>
              <desc>This Employee is working in this company for the past 3 years
               </desc>
               <age>28</age>
            </details>    
         </emp>
    </employees>

谁能帮帮我?

【问题讨论】:

    标签: iphone xcode xml-parsing


    【解决方案1】:

    你可以使用 NSXMLParser 来做同样的事情,你需要实现它的委托来接收解析的值。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-06
    • 2012-07-08
    • 1970-01-01
    • 2012-07-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多