XML parsing to plist iPhone SDK

Posted by victor on Stack Overflow See other posts from Stack Overflow or by victor
Published on 2010-05-25T13:30:30Z Indexed on 2010/05/28 11:21 UTC
Read the original article Hit count: 367

Filed under:
|
|
|
|

Hi, guys. 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

© Stack Overflow or respective owner

Related posts about iphone

Related posts about Xml