Following W3C standards there is a need to have the option to decode and encode xml nodes when reading and writing to XML data.
Specifically this was discovered as a bug in a job created to pull webservice XML information, read a node and insert into a database table using a stored procedure.
Stored Procedure and Table structure only allowed 40 characters and the webservice was outputting 40 characters before encoding but due to "&" becoming "&" the literal read was trying to push 43 char into a 40 char table column.
Reference for XML standards around encode and decode, technically not too complex considering XML does not use as many encoded characters that HTML would use but rather than building in logical conversion / repalcements etc... an encode / decode flag would be nice respective to the task being used.
http://www.w3.org/standards/xml/ Thanks.