Using this component, sometimes happens I'm limited to fully parse some more complex or broken pages.
Those are 2 quite separate problems. If the pages are merely complex then HTML::TreeBuilder::XPath should parse them. You would be helping everyone, yourself included, if you could report such bugs to the maintainer (ideally with an SSCCE) so that they can be fixed. Try to ensure that you are posting the bug against the right dist - it may be that one of the dependencies is actually at fault.
If the pages are broken then it's quite fair for HTML::TreeBuilder::XPath to fail to parse them. Instead you need a way to fix the page before parsing. Have you tried HTML::Valid?