Oh, and I usually use a separate function to indent my xml for readability when I need to actually look at the xml. It's easier than trying to change the element in situ and make it look nice. Josh