converting xml to a datatable from a string c#? -
i trying xml string attachment using imapx later saves data byte[]. , after conversion, string has linebreaks represented \r\n. byte[] att = w.filedata; str = system.text.encoding.default.getstring(att); the string seems have "\r\n" breaks instead of whitespace , new lines str = str.replace("\r\n", " "); when try read xml using string reader read xml stringreader sr = new stringreader("your xml"); dataset ds = new dataset(); ds.readxml(sr); it doesn't seem program can understand code in such format. have tried apply linebreaks in xml instead of \r\n using 
 ; instead without success. xml works fine , converts datatable if retrieved file on system want able create datatable string directly original xml: <?xml version="1.0" standalone="yes"?> <data> <id>931304</id> <age>26</age> </data> <data> <