I'm using the nekohtml parser to parse my html code. Sometime my mistake while using anchor tag the content has been written like this.
<a href="http://abc.com"><a href="http://abc.com">abc</a></a>
After parsing throough the nekohtml i want the content to corrected like this.
<a href="http://abc.com"></a><a href="http://abc.com">abc</a>
For this to achieve please help to configure the nekohtml parsing.
Update:
After i tried with settings as
parser.setFeature( "http://cyberneko.org/html/features/balance-tags", true );
it is of no use. i doesn't give the result as i expected. it returns the same html content as i given
Need to set a
balance-tags
feature that specifies if the NekoHTML parser should attempt to balance the tags in the parsed document.from the docs: