I’ve been trying to solve this issue for some time but still didn’t find the answer. The aim is to get some data from a HTML webpage. I can do all the internet related part but i’ve got a problem. This is the string i have:
class=”datastream-graph-value”>
496
The problem are those quotation marks because otherwise my app would be able to get the “496” which is the important data, but with them there i can’t get my data.
Which would be a good way to get that data? (Note that after the “>” symbol there is a “\n”)
Thank you mates!
While I don’t normally recommend regular expressions to read xml but HTML with an XML parser can be nightmare.
With the below sample.
Use the below regular expression it should handle it well.
Gives a great example of how to use that regex.
http://www.vogella.com/articles/JavaRegularExpressions/article.html
If you need a code sample reply back and we will see what we can’t work out.
edit:
I was bored so I thought why not put a sample together