Questions tagged [hpple]

An XML/HTML parser for Objective-C, inspired by Hpricot.

Features

  • Easy searching by XPath (CSS selectors are planned)
  • Parses HTML (XML coming soon)
  • Easy access to tag content, name, and attributes.
105 questions
0
votes
1 answer

Grabbing the first child of a tag?

Currently I'm following Ray Wenderlich's tutorial dealing with parsing html on ios. Everything is explained perfectly and according to this tree: (source: raywenderlich.com) they extract the title and url tag for each tutorial. This is how they…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
0
votes
1 answer

hpple XpathQuery ideas?

I am using hpple to parse some HTML. I am using Xcode 4.6 and iOS 6.1. It looks like this. I can extract the text and images by using the following XPathQueryStrings. Text ==> //div[@class = 'entry-content']/p Images ==> //div[@class =…
Douglas
  • 2,524
  • 3
  • 29
  • 44
0
votes
2 answers

Parsing a HTML with Hpple

I'm using Hpple to pass a HTML file. The HTML file is very similar to the following.

some text here Inside a another text here

caption here …
0
votes
1 answer

Access HTML 5 Player - iOS SDK

I am using Hpple to get links from webpages and have a problem. Because flash is unsupported on iOS, I have to use the HTML 5 player. What I am trying to do is access the player. If the website loads, and the user doesn't have flash, then there is…
0
votes
1 answer

Hpple XPath query issue for tesseract hocr output

I have the following html snippet WORD1
M.R.
  • 1,053
  • 2
  • 13
  • 30
0
votes
1 answer

How do I get the nth element with a certain name in the entire XML document?

so will something like this work using Hpple Xpath //a[4] The fourth tag in a html tree? Or do i need to do it programmatically by counting in a for() loop?
Nxtmind
  • 57
  • 8
0
votes
2 answers

Problems with XPATH on unclosed tag

I am using tfhpple on IOS to fetch some data feom web. I have this bit of code: 07/02
19:00 .................... The portion I am trying to fetch is 07/02 and 19:00…
0
votes
1 answer

hpple parser get all content with tags

I have a chunk of HTML where I try to get all content inside div but I can't retrieve it with [element content] or [element text].
doc
  • 266
  • 2
  • 15
0
votes
1 answer

TFHpple extracting elements past 'firstChild' or 'parent'

How can I get elements further down the array than firstChild or parent NSString *tutorialsXpathQueryString = @"//table/tr/td/ancestor::table[1]"; // @"//tr/td/table/tr/td/a" NSArray *tutorialsNodes = [tutorialsParser…
BarclayVision
  • 865
  • 2
  • 12
  • 41
0
votes
1 answer

TFHpple - xpath in iOS - get two parents up

looking to get two parents up (great grand parents) or two children down? …
Adrian
  • 19,440
  • 34
  • 112
  • 219
0
votes
2 answers

TFHpple parsing link

How do you parse a link in TFhpple. My code returns an empty array. NSString *link2=[NSString stringWithFormat:@"/html/body/table/tr[%d]/td[1]/a",i+2]; NSArray *linkedNames = [xpathParser searchWithXPathQuery:link2]; NSLog(@"%@",…
0
votes
1 answer

Parse section from HTML page using TFHpple/hpple (IOS)

I am loading an entire HTML page and want to get all content between specific tags. For this I'm doing: articleXpathQueryString = @"//article/div[@class='entry breadtext']"; articleNodes = [articleParser…
Oberheim
  • 78
  • 11
BarclayVision
  • 865
  • 2
  • 12
  • 41
0
votes
2 answers

XCode, iOS: Parsing HTML encoding with hpple

I have a problem with encoding when parsing web page with hpple in XCode. - (void)loadTutorials { NSURL *tutorialsUrl = [NSURL URLWithString:@"http://qrz.si/members/s55db/"]; NSData *tutorialsHtmlData = [NSData dataWithContentsOfURL:tutorialsUrl…
b4d
  • 143
  • 1
  • 9
0
votes
2 answers

Hpple XPath query issue on IOS

I have the following HTML snippet:

Cars

Toyota Opel Audi