Menu

ComputeStyles throws NullPointerException

silvio
2014-12-15
2015-01-23
  • silvio

    silvio - 2014-12-15

    Hello all,

    I just downloaded CSSBox 4.7 and the related libraries (JStyleParser, Xerces, Antlr etc.). I use ComputeStyles on this link:

    http://netpanel.jambo-mobile.com/bindinc/home.html

    and it throws an NPE. I have tried several URLs from the same source and got similar results. Any idea about what I can do to prevent this?

    Thanks in advance.

    Cheers,

    Silvio

     

    Last edit: silvio 2014-12-15
  • silvio

    silvio - 2014-12-15

    Some additional info: it throws on da.attributesToStyles and when I leave that out it throws on da.stylesToDomInherited.

     
  • Radek Burget

    Radek Burget - 2014-12-17

    Hi! Unfortunatelly, the main problem seems to be related to the HTML parser. For some reason that I don't understand, the used NekoHTML parser seems to be totally confused with the code. As the result, no element is present in the resulting DOM and this is the cause of the exception. Probably using a different HTML parser would help.

     
  • silvio

    silvio - 2015-01-23

    Thank you very much! Could this be caused by the page being XML (actually polyglot html5) and might be using plain html5 solve the issue?

     

Log in to post a comment.