Added a setDomNodeContents() helper method to simplify process().