는 경우가 중첩 된 요소를 얻기 위해 넣어되어야 하는지를 테스트, 제목은 전에이 명 발생, 및 entry
후 존재 :는
<feed xmlns:im="http://xxx.com/rss" xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<id>http://xxxxx/xml</id><title>xxxxx: Top articles</title><updated>2013-07-20T04:30:05-07:00</updated><link rel="alternate" type="text/html" href="https://xxxx;popId=1"/><link rel="self" href="http://xxxxxxx/xml"/><icon>http://xxxxxxxxxxx</icon><author><name>xxxxxxx</name><uri>http://www.xxxxx.com/xxxxx/</uri></author><rights>Copyright 2001</rights>
<entry>
<updated>2013-07-20T04:30:05-07:00</updated>
<id im:id="621507457">https://xxxxx.xxxx.com/us/album/blurred-lines-feat.-t.i.-pharrell/id621507456?i=621507457&uo=2</id>
//I want to get only the title nested in entry tree
<title>Robin Thicke</title>
외부의 어떤을 탈출하기 위해 didStartElement:
프로토콜 방식으로해야한다 무엇 테스트 <entry></entry>
?
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict{
if ([elementName isEqualToString:@"title"]) {
//This is not enough, since it bring also the title value which is outside the entry tree
}
}
내가 TBXML 같은 외부 라이브러리에 의존하지 않으려는
, 나는이 순수 NSXMLParserDelegate
에서 행할 어떠했는지를 알고 싶어 ?
나는 당신의 질문에 대답,하지만 당신을주지 않을거야 "더 나은"xml 파서 목록 : http://www.raywenderlich.com/553/xml-tutorial-for-ios-how-to-choose-the-best-xml-parser-for-your-iphone-project – Peres
이미이 기사를 읽었으므로 다른 라이브러리에 의존하지 않고 순수한 NSXMLParserDelegate로 그렇게해야합니다. 고맙습니다. – Malloc