this works good for many pages. ( replaces relative with absolute urls )
but if I try to visit www.ard.de I get the following exception:
Caused by: java.lang.StackOverflowError
at org.htmlparser.lexer.Page.getText(Page.java:1088)
at org.htmlparser.lexer.PageAttribute.getRawValue(PageAttribute.java:383)
at org.htmlparser.Attribute.toString(Attribute.java:749)
at org.htmlparser.nodes.TagNode.toTagHtml(TagNode.java:596)
at org.htmlparser.nodes.TagNode.toHtml(TagNode.java:565)
at org.htmlparser.tags.CompositeTag.toHtml(CompositeTag.java:185)
at org.htmlparser.nodes.AbstractNode.toHtml(AbstractNode.java:129)
at org.htmlparser.tags.CompositeTag.putEndTagInto(CompositeTag.java:170)
at org.htmlparser.tags.CompositeTag.toHtml(CompositeTag.java:190)
What could be wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It may be you've inserted some parent of X as a child of X. It would then loop on itself recursively to compute the toHtml() text.
Carefully review your code and see where your nodes are coming from - or create new ones as a test case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hey!
the code is the following:
http://pastebin.com/m3065834e
this works good for many pages. ( replaces relative with absolute urls )
but if I try to visit www.ard.de I get the following exception:
Caused by: java.lang.StackOverflowError
at org.htmlparser.lexer.Page.getText(Page.java:1088)
at org.htmlparser.lexer.PageAttribute.getRawValue(PageAttribute.java:383)
at org.htmlparser.Attribute.toString(Attribute.java:749)
at org.htmlparser.nodes.TagNode.toTagHtml(TagNode.java:596)
at org.htmlparser.nodes.TagNode.toHtml(TagNode.java:565)
at org.htmlparser.tags.CompositeTag.toHtml(CompositeTag.java:185)
at org.htmlparser.nodes.AbstractNode.toHtml(AbstractNode.java:129)
at org.htmlparser.tags.CompositeTag.putEndTagInto(CompositeTag.java:170)
at org.htmlparser.tags.CompositeTag.toHtml(CompositeTag.java:190)
What could be wrong?
It may be you've inserted some parent of X as a child of X. It would then loop on itself recursively to compute the toHtml() text.
Carefully review your code and see where your nodes are coming from - or create new ones as a test case.
the pasted code is the only one I use. nothing more.
the error only appears when loading the url www.ard.de