Example for procedural xml markup generation in python