/// <summary> /// returns value of <paramref name="xmlNode"/> attribute having /// <paramref name="attributeName"/>. /// </summary> /// <param name="xmlNode"></param> /// <param name="attributeName"></param> /// <returns> /// value of <paramref name="xmlNode"/> attribute having /// <paramref name="attributeName"/> /// </returns> /// <exception cref="XmlNodeMissingAttributeException"> /// <seealso cref="XmlNodeUtils.AssertContainsAttributes(XmlNode, string[])"/> /// </exception> public static string GetAttributeValue(this XmlNode xmlNode, string attributeName) { XmlNodeUtils.AssertContainsAttributes(xmlNode, attributeName); return(xmlNode.Attributes[attributeName].Value); }
/// <exception cref="XmlNodeMissingNodeException"> /// <seealso cref="XmlNodeUtils.AssertContainsNode(XmlNode, string)"/> /// </exception> public static XmlNodeList GetNodes(this XmlNode xmlNode, string xPath) { XmlNodeUtils.AssertContainsNode(xmlNode, xPath); return(xmlNode.SelectNodes(xPath)); }