Updated version of John Resig's htmlparser.js - read blog post
Which was based on Erik Arvidsson's simplehtmlparser.js
toDOM()removed, was not neededthiscontext corrected for WScriptthrow Error()to work for WScripttoXMLStringcan pass intag(),attr()makeMapwill also make uppercase versions
var xmlString = HTMLParser.toXMLString(htmlString)
or
var xmlString = HTMLParser.toXMLString(
htmlString,
function(tag) {
return tag.toLowerCase()
},
function(attr) {
attr.escaped = attr.escaped.replace(/&/g, '&')
return attr
}
)