コード例 #1
0
        public List <HtmlChunk> ParseToChunks(string html)
        {
            //List<HtmlChunk> controls = new List<HtmlChunk>();
            //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.CreateChunks(htmDoc));
        }
コード例 #2
0
        public List <HtmlChunk> ParseToChunks(EntityCollection <TemplateChunksEntity> 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.CreateChunks(chunks));
        }