/// <summary>Parses .Net XML documentation listheader or item.</summary>
        /// <example>
        /// Format options:
        /// <![CDATA[
        ///   <listheader>
        ///     plain text
        ///   </listheader>
        ///   <listheader>
        ///     <term>Term</term>
        ///   </listheader>
        ///   <listheader>
        ///     <description>Description</description>
        ///   </listheader>
        ///   <listheader>
        ///     <term>Term</term>
        ///     <description>Description</description>
        ///   </listheader>
        /// ]]>
        /// </example>
        /// <example>
        /// Format options:
        /// <![CDATA[
        ///   <item>
        ///     plain text
        ///   </item>
        ///   <item>
        ///     <term>Term</term>
        ///   </item>
        ///   <item>
        ///     <description>Description</description>
        ///   </item>
        ///   <item>
        ///     <term>Term</term>
        ///     <description>Description</description>
        ///   </item>
        /// ]]>
        /// </example>
        public static DotNetCommentListItem FromVisualStudioXml(XElement element)
        {
            if (!DotNetComment.IsXmlTag(element, new string[] { "listheader", "item" }))
            {
                return(new DotNetCommentListItem());
            }

            bool isHeader                  = (element.Name.LocalName == "listheader");
            DotNetCommentGroup term        = null;
            DotNetCommentGroup description = null;

            foreach (XNode node in element.Nodes())
            {
                if (node.NodeType == XmlNodeType.Text)
                {
                    if (Utilities.XNodeToString(node).IsAllWhitespace())
                    {
                        continue;
                    }
                    term = DotNetCommentGroup.FromVisualStudioXml(element);
                    break;
                }
                if (node.NodeType == XmlNodeType.Element)
                {
                    XElement child = (node as XElement);
                    switch (child.Name.LocalName)
                    {
                    case "term": term = DotNetCommentGroup.FromVisualStudioXml(child); break;

                    case "description": description = DotNetCommentGroup.FromVisualStudioXml(child); break;
                    }
                }
            }

            return(new DotNetCommentListItem(term, description, isHeader));
        }