如何解析以下XML?

时间:2011-03-14 10:22:29

标签: iphone ios

我希望能够在iPhone上解析以下XML。你能告诉我怎么做吗?谢谢!

<XML>
  <ADD>
        <FOLDER>
              <SOMEDAYID>1</SOMEDAYID>
              <FOLDERNAME>Travel</FOLDERNAME>
              <FOLDERCOLOR>1</FOLDERCOLOR>
              <FolderStatus>1</FolderStatus>
        </FOLDER>
        <EVENTS>
              <EVENT>
                    <SOMEDAYID>2</SOMEDAYID>
                    <DESCRIPTION>U2 rockfestival...</DESCRIPTION>
                    <ISACTIVE>Y</ISACTIVE>
                    <ISDONE>N</ISDONE>
                    <ALERT>1</ALERT>
                    <TRIGGERTIME>2007381580</TRIGGERTIME>
                    <IMAGE>NOIMAGE</IMAGE>
                    <EventStatus>1</EventStatus>
              </EVENT>
        </EVENTS>
  </ADD>
  <EDIT>
        <FOLDER>
              <SOMEDAYID>2</SOMEDAYID>
              <FOLDERNAME>Entertainment</FOLDERNAME>
              <FOLDERCOLOR>2</FOLDERCOLOR>
              <FolderStatus>2</FolderStatus>
        </FOLDER>
        <EVENTS>
              <EVENT>
                    <SOMEDAYID>4</SOMEDAYID>
                    <DESCRIPTION>See HarryPotter</DESCRIPTION>
                    <ISACTIVE>N</ISACTIVE>
                    <ISDONE>Y</ISDONE>
                    <ALERT>1</ALERT>
                    <TRIGGERTIME>1287585716</TRIGGERTIME>
                    <IMAGE>NOIMAGE</IMAGE>
                    <EventStatus>2</EventStatus>
              </EVENT>
        </EVENTS>
  </EDIT>
  <REMOVE>
        <FOLDER>
              <SOMEDAYID>3</SOMEDAYID>
              <FOLDERNAME>Shopping</FOLDERNAME>
              <FOLDERCOLOR>3</FOLDERCOLOR>
              <FolderStatus>3</FolderStatus>
        </FOLDER>
        <EVENTS>
              <EVENT>
                    <SOMEDAYID>4</SOMEDAYID>
                    <DESCRIPTION>See HarryPotter</DESCRIPTION>
                    <ISACTIVE>N</ISACTIVE>
                    <ISDONE>Y</ISDONE>
                    <ALERT>1</ALERT>
                    <TRIGGERTIME>1287585716</TRIGGERTIME>
                    <IMAGE>NOIMAGE</IMAGE>
                    <EventStatus>2</EventStatus>
              </EVENT>
        </EVENTS>
  </REMOVE>

1 个答案:

答案 0 :(得分:1)

在这里查看答案How to parse the following XML?