Strange xml parsing behavior (at least to me!!!)

If you load an xml document with the dom (I tried it with MSXML and System.Xml.XmlDocument) that has the node content set to > (greater than) the value is escaped by the parser.

If you specify an xml (containing the greater than sign) as the node content it isn't escaped.

So if you have

<root>></root> you'll get <root>&gt;</root>

if you have

 <root>><foo /></root> you'll get (the same) <root><foo /></root>

Strange!

posted @ Friday, January 11, 2008 5:00 PM

Print
Comments have been closed on this topic.
«April»
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456