iPhoneアプリケーションの次のHTMLコードを解析したい
<Html>
<body>
<div class="div_1">
<div class="div_2">some code....</div>
<div class="div_3">
<div class="div_4">
<div class="div_5">
<p>First Paragraph</p>
<p>Second Paragraph</p>
<p>Third Paragraph</p>
<p>Fourth Paragraph</p>
</div>
</div>
</div>
</div>
</body>
</Html>
このhtmlの解析にHppleパーサーを使用しています。私が使用しているxpathクエリは
TFHpple *xpathParser = [[TFHpple alloc] initWithHTMLData:getHTMLData];
NSArray *elementsToSearch = [xpathParser searchWithXPathQuery:@"//div[@class='div_5']/p"];
TFHppleElement *element = [elementsToSearch objectAtIndex:0];
私が取得しようとしているのは、div class="div_5"内のすべてのpタグの内容です。上記のxpathクエリを使用すると、最初のpタグの内容、つまり「最初の段落」のみが取得されます。xpathで何か問題がありますか?