View Single Post
  #2 (permalink)  
Old 02-09-2008, 07:04 PM
jelly's Avatar
jelly jelly is offline
Member
 
Join Date: Jan 2008
Location: Somerset, UK
Posts: 46
jelly is on a distinguished road
The reason that the conversion when the XML is written is is that the values you are trying to store are considered to be parsed data, i.e data that is the middle of a start and end tag, like the word FRED in the following

Code:
<Name> FRED </Name>
data stored in this way is looked at and parsed by XML parsers hence any '<' or '>' characters would cause problems ( the parser would not know whether a tag was starting or whether this was data. One way round this is to convert the < and > characters ( and some others ) to what are known as entities &lt; and &gt; which represent the less than and greater than symbols. This is what you seeing. Another way round the problem is to tell the parser _not_ to look at the data - then you can put there what you like, you do this by creating CDATA blocks which would look like the following for your example of an <a> tag

Code:
<SomeTag> <![CDATA <A href="www.yahoo.com">yahoo</A> ]]> </SomeTag>
__________________
-- Hope that helps
Reply With Quote