Click here to Skip to main content
16,019,043 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I create a application.In that use the Treenode .For parent node and child node fetch the names through xml fiile.Now I want to give "Plus!" name for parent tree node.But.When i have to write <Plus!> in xml then error get occured.Same for also instead of ! i write 0x21 ASCII code for it its not accept.

How to write !,#,& in xml file?
Posted
Updated 18-Jul-12 23:06pm
v2

You can't use that character in element names. Element names need to start with a letter or underscore. After that, digits, period, hyphen and underscore are also allowed. Colon can also be used and for namespaces.Other characters can't be used. Also, starting the name with "xml" isn't allowed.

Good luck!
 
Share this answer
 
Your question is wrong, because you can use any unicode character in an xml file, but not in any role.
XML element tag has to be a name as defined in the xml specification: http://www.w3.org/TR/REC-xml/#NT-Name[^]. As I see, neither of your ominous characters comply.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900