Added helper methods to print the contents of an element.