Peter Kiers
asked on
Using xml in my c# application
Hi,
I have this:
"<Node Id=" + "3" + " ParentId=" + "1" + ">" + "\r\n" +
I use this line above to display it in a textbox.
Only I need to display the " too
(I don't know how you call " in english)
So it has to be something like this:
""3"" but with this I get an error.
How can i display the "-sing in my textbox.
I hope I have explain this right. My English isn't very well.
Peter
I have this:
"<Node Id=" + "3" + " ParentId=" + "1" + ">" + "\r\n" +
I use this line above to display it in a textbox.
Only I need to display the " too
(I don't know how you call " in english)
So it has to be something like this:
""3"" but with this I get an error.
How can i display the "-sing in my textbox.
I hope I have explain this right. My English isn't very well.
Peter
" instead of the " to escape it in XML
ASKER
Don't understand what you mean. Can you give me an example
Peter
Peter
""3""
ASKER
??? when i do that i get displayed in the textbox:
<Node Id="3" ParentId=1>
and it should be
<Node Id="3" + ParentId="1">
<Node Id="3" ParentId=1>
and it should be
<Node Id="3" + ParentId="1">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
With this I get an error:
"<Node Id=" + ""3"" <================
"<Node Id=" + ""3"" <================
so when you write it to the textbox, either do a .Replace(""", "\"") or HTMLEncode(myXML)
ASKER
This works for me:
"<Node Id=" + doubleQuote + 3 + doubleQuote etc...
Thanks.
500 points goes to NomanBD
Greetings,
Peter Kiers
"<Node Id=" + doubleQuote + 3 + doubleQuote etc...
Thanks.
500 points goes to NomanBD
Greetings,
Peter Kiers
Please review this: http://www.hdfgroup.org/HDF5/XML/xml_escape_chars.htm
Note the escape characters. To put these in XML, you have to escape them as specified and then un-escape them when you use them.
Note the escape characters. To put these in XML, you have to escape them as specified and then un-escape them when you use them.