XML serializer with pretty printing