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

get contents of all

tags inside

I want to parse the following html code for my iphone application
some code....
southpark
  • 541
  • 2
  • 5
  • 19
0
votes
1 answer

iPhone SDK: hpple html parser SIGABRT

I have the following code: -(void)getHTMLData { NSData *data = [[NSData alloc] initWithContentsOfFile:@"example.html"]; TFHpple *xpathParser = [[TFHpple alloc] initWithHTMLData:data]; //Get all the cells of the 2nd row of the 3rd table…
EI756
  • 557
  • 1
  • 8
  • 19
0
votes
1 answer

How to get elements of html,xml by hpple ( xpath )?

please use hpple(xpath), This is a followup to my previous question: http://stackoverflow.com/questions/6723244/iphone-how-to-select-this-label How can I get the number in seekVideo(number)? For example:
libai
  • 195
  • 1
  • 2
  • 12
0
votes
1 answer

objective-c - Which lib I should use to parse HTML?

I am trying to parse some not-complicated RSS html content in iphone. So I don't need a heavy HTML parser. I have searched here and found these two: https://github.com/topfunky/hpple https://github.com/zootreeves/Objective-C-HMTL-Parser Both are…
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271
0
votes
1 answer

xpath Table Contents into an array

How would I use xPath under the hpple Objective-C wrapper to extract the elements out of this table. Ideally I would like to put the addresses and prices into an array or dictionary. I have been attempting to use the hpple objective c wrapper to…
rich
  • 2,136
  • 19
  • 23
0
votes
1 answer

Which is the fastest way to get a URL from an HTML tag (Regex, NScanner, Hppple)?

I found 3 different way to get the value of the src attribute of an img tag in an HTML string. With a Regex using RegexKitLite. With TFHpple HTML parser Using a NSSCanner to scan the HTML string. So which way I must use to optimize performance of…
paul_1991
  • 245
  • 4
  • 13
0
votes
1 answer

Returning a tag name with Hpple HTML Parser?

How do i grab the URL_TO_GRAB, with Hpple/Xpath for iPhone? Do i need to use some regex? Thanks a bunch.
CSL
  • 140
  • 1
  • 5
0
votes
1 answer

How to select something with its tags? And 1 more question about tag ignoring

i have to parse google and other search systems search results, and i want to take something with tag, for example i have:

Aft3rmath
  • 1
  • 1

0
votes
2 answers

hpple html parse block by block or property by property?

I'm new about hpple and xpath. for the below html code,I want to get both "title" and "tag" information. From hpple's example code, I can get a array of title, and another array of tag. But if there are six properties I'm interested, there will be…
Ke CAI
  • 233
  • 6
  • 17
0
votes
1 answer

Get HTML from query url (index.php?[arguments] ) Swift 3 ios

I'm working on Ios and Swift 3 and I want to parse HTML Code. Until now Hpple did the trick for me using this code: func parse_Html_Text(url:String) { let data = NSData(contentsOf: URL(string: url)!) let doc = TFHpple(htmlData: data! as…
Elem J
  • 1
0
votes
2 answers

Regular Expressions (HTML parsing on iPhone)

I am trying to pull data from a website using objective-c. This is all very new to me, so I've done some research. What I know now is that I need to use xpath, and I have another wrapper for that called hpple for the iPhone. I've got it up and…
nicholjs
  • 1,762
  • 18
  • 30
0
votes
2 answers

How do you get the attributes of a Child Array using TFHpple?

I'm using TFHpple (which uses XPath) to parse an HTML document. I can get the content of various nodes, etc. But the code I found on GitHub seems incomplete. It has a method to get the attributes of a node but the child array. So I wrote one and…
Troy Sartain
  • 163
  • 1
  • 4
  • 15
0
votes
1 answer

XPath Ancestor Axis Multiple Parents

So I am writing a mac application that parses SF Giants baseball statistics using xpath. In my situation I have a specific number Identifier of a person 1. (in my application a person could search find a…
user380776
  • 37
  • 6
0
votes
1 answer

Using hpple in Swift

I am using hpple in Swift and would like to use the same syntax. Objective-C works perfectly: myElement.title = [[element firstChild] content]; Swift does not compile: myelement.title = element.firstchild.content I receive the error…
Pete
  • 613
  • 1
  • 6
  • 18
0
votes
1 answer

Add hpple to Swift project - Lexical or Preprocessor Issue

I am adding the hpple files to my Swift project and get the following error message in my XPathQuery.m class at the following import: #import --> 'libxml/tree.h' file not found I also get the message: Lexical or Preprocessor…
Pete
  • 613
  • 1
  • 6
  • 18