Improved custom XML related functionality