public static object GetArgument(ArgumentTree tree, string name, object defval)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(tree.Value);
            }

            string stripped;
            string key = StripPrefix(name, out stripped);

            ArgumentTree child;

            if (!tree.Children.TryGetValue(key, out child))
            {
                return(defval);
            }

            return(HtmlArgumentTree.GetArgument(child, stripped, defval));
        }
        public static string AllToHtml(ArgumentTree tree)
        {
            if (tree.Children.Count == 0)
            {
                return(ToHtml(tree));
            }

            StringBuilder output = new StringBuilder();

            output.Append(tree.Value);
            output.Append("<ul>");
            foreach (KeyValuePair <string, ArgumentTree> kvp in tree.Children)
            {
                output.Append("<li>" + kvp.Key + ": " + HtmlArgumentTree.AllToHtml(kvp.Value) + "</li>");
            }
            output.Append("</ul>");

            return(output.ToString());
        }