how to parse the local XML correctly?

前端 未结 1 1669
孤城傲影
孤城傲影 2021-01-23 01:04

I am new in iOS programming; and now I am trying to parse a local XML file. It worked properly and showed the name in NSLog; but when i pasted the same thing over it showed only

1条回答
  •  故里飘歌
    2021-01-23 01:31

    The problem is not with your parsing code, but with your XML input. An XML file must have a single top-level element, for example:

    
       
       ...
       
       
       ...
       
       
       ...
       
    
    

    In your case, the XML parser stops reading after the first Author element.

    0 讨论(0)
提交回复
热议问题