completed adding xml support, package tidyup