addiing some xml utility code