开发者

XML parsing to plist iPhone SDK

Could you, please, help me with parsing of this XML code:

 <?xml version="1.0" encoding="utf-8"?>
    <stuff>
      <parts>
        <part id='327'>
          <name>Logitech MX500</name>
          <serial>618163558491989</serial>
          <account>ASDALSKD</account>
          <number>987 789 456</number>
          <alarm>alarm1</alarm>
        </part>
        <part id='846'>
          <name>Logitech MX510</name>
          <serial>871351434945431</serial>
          <account>KJSDAKLJFA</account>
          <number>454 564 131</number>
          <alarm>alarm2</alarm>
        </part>
      </parts>
    <info>Information</info>  
    </stuff>

And save data to plist file stuff.plist in this format:

327   NSArray
  Name  NSString  Logitech MX500
  Serial  NSString  618163558491989
  Account  NSString  ASDALSKD
  Number  NSString  987 789 456
  Alarm  NSString  alarm1
846开发者_开发技巧   NSArray
  Name  NSString  Logitech MX510
  Serial  NSString  871351434945431
  Account  NSString  KJSDAKLJFA
  Number  NSString  454 564 131
  Alarm  NSString  alarm2
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜