A issue that pops up frequently is that the XmlService can not parse html. I took a look at what was available and found a node module htmlparser2. I ran it though browserify and modified it slightly to work as an Apps Script library. It seems to work quite well. I have the library source on my github:

or you can link to it


For documentation check out the original repo for the module at:
Shared publiclyView activity