xml读取
XmlDocument xd = new XmlDocument(); XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreComments = true;//忽略注视12121 XmlReader xReader = XmlReader.Create(filepath, settings); xd.Load(xReader); XmlNode root = xd.DocumentElement; XmlNodeList nodeList = root.ChildNodes; XmlNodeList portrait_nodelist = root.SelectNodes("/picture/portrait"); string head = portrait_nodelist.Item(0).Attributes["originaldir"].Value;