Re: what can i do if i want to include "<" or ">" in xml document.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Escape them to "&lt;" and "&gt;" (excluding the surrounding quotes.

">" is ususally safe even unescaped in most contexts.

Sometimes it becomes necessary to escape the quotes and the apostrophe
characters -- accordingly -- with "&quot;" and "&apos;"

Another character to escape almost always is the ampersand character
itself -- this is escaped as "&amp;"


Cheers,
Dimitre Novatchev


"Steven.Xu" <StevenXu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DED43E7B-486A-45C9-A566-F1DACEC8C429@xxxxxxxxxxxxxxxx
hi everybody,
i am useing some classes which in System.Xml to deal with xml document.
what
can i do if the document include "<" or ">"?

Thanks.


.



Relevant Pages

  • Re: A critique of cgi.escape
    ... and quotes should always be escaped. ... Making cgi.escape always escape the '"' character would not break ... and would probably fix a few bugs in existing code. ...
    (comp.lang.python)
  • Re: Getting Starting in JavaScript et al
    ... To date I have had three epiphanies where I have suddenly "got" javascript and realized how utterly diffident my previous understanding of the subject had been. ... Identifying and understanding the types of values that javascript uses; that there are 5 primitive data types (boolean, number, string, null and the undefined type). ... tab would then contain the tab character, ... Javascript has escape sequences that start with a backslash, but there are a number of types. ...
    (comp.lang.javascript)
  • Re: escaped identifier vs regular names ?
    ... Escaped identifiers are not in a separate namespace from normal ... the terminating whitespace character to be a space character, ... And, yes, many Verilog tools create escaped names of this form. ... escape names, it isn't really handling the entire Verilog language. ...
    (comp.lang.verilog)
  • Re: delimiters, sql, joins, AHHH!
    ... To decide whether or not to delimit the data, look at the datatype of the ... means you MUST NOT delimit the data by putting quotes around it. ... the data contains an apostrophe, then you must replace the apostrophe with ... you don't have to escape the apostrophe in O'Malley when you use ...
    (microsoft.public.inetserver.asp.general)
  • Re: delimiters, sql, joins, AHHH!
    ... > contains literal quotes, you must escape them by doubling them. ... > that if you use single quotes for your string delimiters, ... > the data contains an apostrophe, then you must replace the apostrophe with ...
    (microsoft.public.inetserver.asp.general)