I have an xml file that is like this:
<xml>I need this tex开发者_如何学Pythont<notthistext>blahblah<notthistext></xml>
I get the text by doing something like this:
var mycollection = from myNode in myDoc.descendents("xml") select new { test = Convert.ToString(myNode.Nodes().First())}
but the problem is that there are carrige returns and spaces that don't exist in the file
this is what i get:
"/r/n I need this text"
What is going on!!!!! What i need is:
"I need this text"
Have you considered Trim, specifying the characters?
精彩评论