I get the HTML string from webservice.
<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/kU3Um.jpg" data-original="https://i.stack.imgur.com/kU3Um.jpg" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />
When I parse on saxparser, it throws fatal error1.
Start tag (Image tag) doesn't match with end tag. Then how to get image src? And how to get div id name? Or is there any other parser to parse HTML string? Please help me.Answer1:
Parsing HTML is a non-trivial problem, made more difficult on BlackBerry smartphones by the limitations of J2ME. I have a <a href="http://www.hrbuckley.net/2011/08/parsing-html-on-blackberry.html" rel="nofollow">blog posting on leveraging the BrowserField to parse the HTML</a>, which will then give you a DOM document. It solved my problem, something similar may work for you.