Skip to content

Instantly share code, notes, and snippets.

@MikeWarren2014
MikeWarren2014 / EmailUtils.groovy
Created November 22, 2022 08:07
How to scrape an email message body with Groovy and xpath
import javax.xml.parsers.DocumentBuilderFactory
import javax.xml.xpath.XPathFactory
import org.w3c.dom.Element
// feel free to make this your own :)
public final class EmailUtils {
/**
* **NOTE**: forked from https://stackoverflow.com/a/2269464/2027839 , and then refactored
*