CsQuery.CQ.CreateDocument C# (CSharp) Method

CreateDocument() public static method

Creates a new DOM from a stream containing HTML
public static CreateDocument ( System.Stream html ) : CQ
html System.Stream /// An open Stream ///
return CQ
        public static CQ CreateDocument(Stream html)
        {
            return new CQ(html, null,HtmlParsingMode.Document, HtmlParsingOptions.Default, DocType.Default);
        }

Same methods

CQ::CreateDocument ( System.Stream html, Encoding encoding ) : CQ
CQ::CreateDocument ( System.Text.TextReader html ) : CQ
CQ::CreateDocument ( string 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