private static string EncodedPath(ProfilePath path) { string[] paths = new string[path.Length]; for (int i = 0; i < path.Length; i++) { paths[i] = XmlNormalizer.TagEncode(path[i]); } return(string.Join("/", paths)); }
public void AddValue(ProfilePath path, string value) { XmlNode rootnode = _document.DocumentElement; foreach (string name in path) { XmlNode node = null; string n = XmlNormalizer.TagEncode(name); node = rootnode.SelectSingleNode(n); if (node == null) { node = _document.CreateElement(n); rootnode.AppendChild(node); } rootnode = node; } XmlAttribute attrib = _document.CreateAttribute("value"); rootnode.Attributes.Append(attrib); attrib.Value = value; }