xml.SelectSingleNode("root//user").Attributes["uid"].Value.Length
xmlPath路径语法
http://www.w3school.com.cn/xpath/xpath_syntax.asp