I'm having htmlcontent which contains greater than and less than symbol. But those symbols are not encoded as < and >. To balance tags in the content i pass the content through cyberneko html parser. After parsing content in between those greater than and less than symbol are discared. To overcome this problem, what settings i have to set up in the cyberneko html parser?
sample content:
<div>Average Response Time server is critical because its value 282 > 0 ms. <br>[Threshold Details : Critical if value > 0, Warning if value = 0, Clear if value < 0]</div>
After nekohtml parsing
<div><br> 0]</div>
Please help. Thanks in advance
The program below will output
<div>Average Response Time server is critical because its value 282 > 0 ms. <br/>[Threshold Details : Critical if value > 0, Warning if value = 0, Clear if value < 0]</div>
The comments in the code above show the parser settings i've used.
I've also used the org.cyberneko.html.parsers.DOMFragmentParser as you may also be parsing text that is just an html fragment
I'm using nekohtml 1.9.14
If you use maven, here's the pom.xml dependencies section...