title: Getting the HTML tags in hpple as well as text?
body: <p>The code below takes all of the text from a certain div. Is it possible for me to take all the text from the div as well as the html attributes? So it also adds all of the <code>&lt;p&gt; &lt;/p&gt;'s</code> and <code>&lt;br&gt; &lt;/br&gt;'s</code> to the string, myString?</p>
  
  <pre><code>//trims string from previous page
          NSString *trimmedString = [stringy stringByTrimmingCharactersInSet:
                                   [NSCharacterSet whitespaceAndNewlineCharacterSet]]; 
  
      NSData *data = [[NSString stringWithContentsOfURL:[NSURL URLWithString:trimmedString]] dataUsingEncoding:NSUTF8StringEncoding];
      TFHpple *xpathParser = [[TFHpple alloc] initWithHTMLData:data];    
      NSArray *elements  = [xpathParser searchWithXPathQuery:@"//div[@class='field-item even']"];
      TFHppleElement *element = [elements lastObject]; //may need to change this number?!
      NSString *mystring = [self getStringForTFHppleElement:element];
  
      trimmedTextView.text = [trimmedTextView.text stringByAppendingString:mystring];
  </code></pre>
  
  <p>Method here:</p>
  
  <pre><code>-(NSString*) getStringForTFHppleElement:(TFHppleElement *)element 
  {
  
  NSMutableString *result = [NSMutableString new];
  
  // Iterate recursively through all children
  for (TFHppleElement *child in [element children])
      [result appendString:[self getStringForTFHppleElement:child]];
  
  // Hpple creates a &lt;text&gt; node when it parses texts
  if ([element.tagName isEqualToString:@"text"])
      [result appendString:element.content];
  
  return result;
  }
  </code></pre>
  
  <p>Any ideas would be appreciated. Cheers.</p>