I'm trying to parser an HTML with the TBXML library for iOS and I want to obtain the "more text" value for this piece of HTML:
<div>
<a href="/url/1">
<strong>value</strong>
</a>
more text
</div>
I have used this code, but it does not seems to work:
//Assume that "div" is a TBXMLElement* for this div
NSString* content = [TBXML textForElement:div];
//Returns @"" when the value @"more text" is expected...
What's wrong in my code?
Ok, I have modified the TBXML Library and I have resolved the problem...If someone has the same issue, try this:
1) Create an attribute in the file TBXML.h for TBXMLElement with name NSString* afterText.
2) Search this code in the file TBXML.m and comment it:
3) Write this code before the code of the step 1:
Now the attribute "after text" contains "more text".
It's not an orthodox solution but it's works for me.