コード例 #1
0
        /// <summary>
        /// Generate runtime receipt xml structure for display on a textbox for debugging purposes
        /// </summary>
        /// <param name="root">The root element</param>
        /// <returns>Html textbox containing the xml</returns>
        public string Debug(IXPathNavigable root)
        {
            StringBuilder html = new StringBuilder();

            if (CommonLogic.QueryStringBool("debug"))
            {
                html.AppendFormat("<textarea cols=\"100\" rows=\"80\" >\n");
                XPathNavigator nav = root.CreateNavigator();
                html.Append(nav.OuterXml);
                html.AppendFormat("</textarea>\n");
            }

            return(html.ToString());
        }