Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Parsing HTML to DOM

Hi
I was hopping to be able to parse a HTML in DOM

var responseText = this.responseText; // This is my page
dom = Ti.XML.parseString(xml); // This is crashing
Ti.API.info(dom);

What I would like to achieve, is reading a page and extrapolate the context of some items
for example

<div class="special">BLAHBL</div>

I would like to have back BLAHBL, possibly without RE

— asked October 10th 2010 by Michele Nasoni
  • dom
  • parsing
0 Comments

1 Answer

  • you may use htmlparser.js and soupselect.js and and select ur class that is you have to iterate it like 'div.special' and iterate thru each row.

    var result = rows.children[0].data;

    — answered April 13th 2014 by aneesh vnb
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.