Python example to read and process XML document