How to parse XElement with &, <, > symbols?

ahptintantnoun

New Member
I have xml like this \[code\]<root> <text>My test is 5 > 2 & 10 < 12</text></root>\[/code\]When I convert it to xElement\[code\]var xe = XElement.Parse(xml);\[/code\]I get errors If xml contents & so I get this error ?An error occurred while parsing EntityName?If xml contents > so I get this error ?Name cannot begin with the '<' character, hexadecimal value 0x3C.?
 
Back
Top