Ticket #133 (new defect)
Opened 7 months ago
Traversing Hpricot::Text object
| Reported by: | jmilarsky | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | ext/hpricot_scan | Version: | |
| Keywords: | Cc: |
Description
Is there a way to convert an Hpricot::Text object to an Elem or Elements object easily?
I need to parse some fairly ugly html (and yes, I did create my original Doc object using fixedup_tags => as an option), and I've pared it down to one giant Hpricot::Text object, which, in its string form, is 700-plus lines.
There are *clearly* html tags within this object, but obj.search('a') (as an example) yields nothing, and the generic
obj.search()
returns the entire object. I've even tried calling new_data = Hpricot(obj) and am still left with what seems to be an untraversible string.
For background, I am using Hpricot 0.7 (downloaded via gem) on Mac OSX Leopard.
Thanks in advance for any helpful suggestions and please let me know if I can further clarify my question.
