Helper methods for XML + unit tests.