I don't think that you can. The XML standard limits the characters you can
use (
http://www.w3.org/TR/xml11/#dt-element). Just like a compiler would
not allow the character "/" within a variable name.
Why would you want to do that anyway? If you could do what you want, you
would potentially confuse other standards like XPath which uses that symbol.
If you need special characters for presentation purposes, I would suggest
you rely on your code or move that information to an attribute or element
content.
"Nimrod Cohen" <ni****@hotmail.com> wrote in message
news:ul**************@TK2MSFTNGP11.phx.gbl...
Hi,
newbie that i am in .Net, i'm trying to add "D/T" as a new element in C#
:
XmlElement elemAttr =
(XmlElement)m_xmlDoc.AppendChild(m_xmlDoc.CreateEl ement("D/T" ) );
but the framework throws an XmlException ...
how do i overcome this ? do i have to parse the string for special chars
myself ?
please advise,
thanks , nim_co.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!