refactor
format attribute values like CDATA not like element text