Reputation: 6702
i have values with special chars that encoded to ascii in my xml. for example :
<?xml version="1.0" encoding="UTF-8"?>
<response>
<name>Žirmūnų</name>
</response>
but when i parse value name
i get only &
as value.
Is it allowed to use #
or &
in xml? or i have to use cdata necessarily?
Upvotes: 13
Views: 40798
Reputation: 195
& needs to be escaped as it is used for esaping itself. All escapes start with & ("
, <
, >
).
&
is the escape for &
Upvotes: 6
Reputation: 638
The & character appears to be illegal, use (below) instead.
&
The # character should be OK.
Also this may be useful: http://xml.silmaril.ie/specials.html.
Upvotes: 19