CsQuery.CQ.CreateDocument C# (CSharp) Method

CreateDocument() public static method

Creeate a new DOM from HTML text using full HTML5 tag generation.
public static CreateDocument ( string html ) : CQ
html string /// A string of HTML ///
return CQ
        public static CQ CreateDocument(string html)
        {
            return new CQ(html, HtmlParsingMode.Document, HtmlParsingOptions.Default, DocType.Default);
        }

Same methods

CQ::CreateDocument ( System.Stream html ) : CQ
CQ::CreateDocument ( System.Stream html, Encoding encoding ) : CQ
CQ::CreateDocument ( System.Text.TextReader html ) : CQ

Usage Example

コード例 #1
0
ファイル: Create.cs プロジェクト: asmboom/HtmlRenderer
        /// <summary>
        /// Creates a new DOM from an HTML file.
        /// </summary>
        ///
        /// <param name="htmlFile">
        /// The full path to the file
        /// </param>
        ///
        /// <returns>
        /// The new document from file.
        /// </returns>

        public static CQ CreateDocumentFromFile(string htmlFile)
        {
            using (Stream strm = Support2.GetFileStream(htmlFile))
            {
                return(CQ.CreateDocument(strm));
            }
        }
All Usage Examples Of CsQuery.CQ::CreateDocument