k4 napisał(a):
> Hi
>
[quoted text clipped - 28 lines]
>
> any idee ?
My error:
Exception in thread "main" java.lang.AbstractMethodError:
org.w3c.tidy.DOMElementImpl.setTextContent(Ljava/lang/String;)V
Why ???? All day i spend time to run this Jtidy :(
Tom Hawtin - 02 Apr 2007 23:10 GMT
> My error:
> Exception in thread "main" java.lang.AbstractMethodError:
> org.w3c.tidy.DOMElementImpl.setTextContent(Ljava/lang/String;)V
That's a /little/ more information than "I can't return text between <p>
xx </p>".
AbstractMethodError API docs say:
"Thrown when an application tries to call an abstract method. Normally,
this error is caught by the compiler; this error can only occur at run
time if the definition of some class has incompatibly changed since the
currently executing method was last compiled."
Essentially you've called an abstract method (as interface methods are)
and the implementing class hasn't implemented it. How? Probably it was
compiled with an earlier version of the interface that didn't have that
method.
API docs for Node.setTextContent/getTextContent:
"Since:
DOM Level 3"
JTidy doesn't support DOM Level 3 (or fully support Level 2 come to
that). So you need to use the old school methods, which I believe is to
iterate through the tree looking for Text nodes.
Tom Hawtin