To pretty print XML from Java, you can use the javax.xml.transform.Transformer class from the Java XML Transformer API.
To pretty-print a JSON file in Python, you can use the json module.
In Python, you can use the built-in function vars() to print the properties and values of an object.