Please see my comments to the question.
Consider using this:
https://www.npmjs.org/package/htmlparser[
^].
See also:
http://ejohn.org/blog/pure-javascript-html-parser[
^].
Try to do your own search:
http://bit.ly/1hmkFs2[
^].
But the whole idea to store data in HTML is bad. HTML should be used only to present data to human users. It can be marginally justified only for
Web scraping, but such scrapping does not need Javascript, could be done using some compiled language, something depending on your platform.
—SA