public override XmlNode GetSingleNode(string path, bool navigateAttributeWise = true) { var xPath = new XPath.XPath(path, navigateAttributeWise); var node = SettingsStorage.SelectSingleNode(SettingsXPathCreator.CreateXPath(xPath)); return(node); }
public override string GetPropertyValueData(string path, string propertyName, bool navigateAttributeWise = true) { var xPath = new XPath.XPath(path, navigateAttributeWise); var node = SettingsStorage.SelectSingleNode( SettingsXPathCreator.CreatePropertyValeXPath(xPath, propertyName)); var value = node?.InnerText; return(value); }
public override string GetAttributeValue(string path, string attribute, bool navigateAttributeWise = true) { var xPath = new XPath.XPath(path, navigateAttributeWise); var value = SettingsStorage .SelectSingleNode(SettingsXPathCreator.CreateElementAttributeValueXPath(xPath, attribute)) ?.Value; return(value); }
public override string GetPropertyValueData(XmlNode node, string propertyName) { var nodePath = SettingsXPathCreator.CreateNodeXPath(node) + SettingsXPathCreator.CreatePropertyValeXPath(null, propertyName, XPathCreationOptions.Absolute, false); var result = SettingsStorage.SelectSingleNode(nodePath); var value = result?.InnerText; return(value); }
public override IEnumerable <XmlNode> GetChildNodes(string path, bool navigateAttributeWise = true) { var xPath = new XPath.XPath(path, navigateAttributeWise); var nodes = SettingsStorage.SelectSingleNode(SettingsXPathCreator.CreateXPath(xPath)); if (nodes == null || !nodes.HasChildNodes) { return(new List <XmlNode>()); } return(nodes.ChildNodes.Cast <XmlNode>().ToList()); }
public override string GetPropertyValueData(XmlNode node, string path, string propertyName, bool navigateAttributeWise = true) { var nodePath = SettingsXPathCreator.CreateNodeXPath(node); var xPath = new XPath.XPath(path, navigateAttributeWise); var additPath = nodePath + SettingsXPathCreator.CreatePropertyValeXPath(xPath, propertyName, XPathCreationOptions.AllowEmpty); var result = SettingsStorage.SelectSingleNode(additPath); var value = result?.InnerText; return(value); }