XDocument xd = new XDocument(
new XDeclaration("1.0", "UTF-8", "yes"),
new XElement("Command",
new XAttribute("name", "LOGIN_REQ"),
new XAttribute("sn", "1"),
new XAttribute("version", "1.0.0"),
new XElement("UserID", lg.userID),
new XElement("UserPwd", Convert.ToBase64String(Encoding.ASCII.GetBytes(lg.userPwd)))
));
return xd.ToString();
生成的xml 最后轉(zhuǎn)換string
格式
我希望的是
中間不要那個(gè)回車還是換行符!
添加回答
舉報(bào)
0/150
提交
取消