The conceptual "algorythm" regarding the detection of objects, vectors or text is clear for me. I was talking about how to specifically discriminate between text and objects in the code, since I could not find any "isText" function or something like that; even the "hasChilds" function is not valid since a tag containing a text returns a child...