JSOUP Android How can I check if an Element specific Is the tag? I have a bunch of elements that they are using to display the data in such index, such an icon, title, description, in them. But some elements have a specific tag name and others do not have ("object") that I need to link to an element. Example: Element # 1 - An object tag - & gt; Leave element element # 2 - no object tag - & gt; Element element element # 3 - Object tag is included - & gt; Remove object data and display in list view item # 3 element # 4 - no object tag - & gt; Element element element # 5 - Object tag is included - & gt; Remove the object data and display the list view item # 5 element # 6 - an object tag - & gt; Skip element Is there something like this: I have tried mElements.select (" td.ac6 "). Get (i) .select (" object ") equals ("") And equals (zero) and nothing.
for
(int i = 0; i & lt; mElements.select ("td.ac6") .i (+); i ++) {if (mElements.select ("td.ac6"). Get (i) ...... // Remove some containTagName ("object") // tag data / Leave element (<">" <">
if (mElements. Select ("td.ac6"). Selection ("object") size ()> 0) // Remove the tag data and / Leave element
No comments:
Post a Comment