Пример #1
0
        public System.Web.UI.Control[] ParseToControls(System.Web.UI.Page page, string html)
        {
            List <System.Web.UI.Control> controls = new List <System.Web.UI.Control>();
            //Read header tag, if any.
            HtmlDoc htmDoc = new HtmlDoc(html);

            //Get the plugin for this doctype
            IHtmlParserPlugin parser = _plugins[htmDoc.DocumentType];

            //Get Chunks
            return(parser.CreateControls(page, htmDoc));
        }
Пример #2
0
        public System.Web.UI.Control[] ParseToControls(System.Web.UI.Page page, List <HtmlChunk> chunks, string parserType)
        {
            if (!_plugins.ContainsKey(parserType))
            {
                throw new BASEGenericException("Parser type does not exist");
            }

            //Get the plugin for this doctype
            IHtmlParserPlugin parser = _plugins[parserType];

            //Get Chunks
            return(parser.CreateControls(page, chunks));
        }