Original Post
Hey, I'm writing a GreaseMonkey script to clean up some HTML and it goes fairly well. I can remove any elements I don't need and mark some important ones. The problem I have is removing multiple consecutive BR tags, since the removing of elements leaves them behind. If I use something like:
var brs = document.evaluate("//br", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); then the nextSibling property is always null so I cannot check if two BR's follow eachother. Does anybody have an idea on how to go about this? tia, CipherCraft