|    
|
From: "Kevin Haney" Subject: deserialize adding ascii 10 to beginning and end of XmlText ... Date: Fri, 7 Jun 2002 13:21:18 -0400
| |
When deserializing the following, <session_id gid="foo" uid="111111" ipaddr="1.1.1.1"> sessionidhere </session_id> the XmlText attribute I define to capture the session_id node's text attribute always comes back with two extra bytes (ascii 10 character), one at the beginning and one at the end of the string. I'm reading the data out of a file into TextReader, which I'm passing to Deserialize. I've tried constructing the TextReader with each of the various encoders, but no luck. Here is the object definition: [XmlRoot (Namespace = "", DataType="string", ElementName = "session_id")] public class SessionData { [XmlAttribute()] public string gid; [XmlAttribute()] public string uid; [XmlAttribute()] public string ipaddr; [XmlText (DataType = "string", Type = typeof(string))] public string SessionID; }
| | Post a follow up to this message... |
|  |
|