Click here to Skip to main content
15,884,986 members
Articles / Web Development / XHTML

A non-well-formed HTML Parser and CSS Resolver

Rate me:
Please Sign up or sign in to vote.
2.86/5 (14 votes)
20 Jul 20072 min read 109.1K   989   57  
A non-well-formed HTML parser and CSS Resolver builded by pure .NET C#
namespace HTMLTreeDemo
{
    partial class HTMLTreeDemo
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if(disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
            this.splitContainer3 = new System.Windows.Forms.SplitContainer();
            this.m_htmlTreeView = new System.Windows.Forms.TreeView();
            this.m_cssTreeView = new System.Windows.Forms.TreeView();
            this.m_menuStrip = new System.Windows.Forms.MenuStrip();
            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
            this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.httpdesignstudiolookinatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.splitContainer2 = new System.Windows.Forms.SplitContainer();
            this.m_webBrowser = new System.Windows.Forms.WebBrowser();
            this.splitContainer4 = new System.Windows.Forms.SplitContainer();
            this.m_textBox = new System.Windows.Forms.TextBox();
            this.m_selectorTextBox = new System.Windows.Forms.TextBox();
            this.m_propertyGrid = new System.Windows.Forms.PropertyGrid();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            this.splitContainer3.Panel1.SuspendLayout();
            this.splitContainer3.Panel2.SuspendLayout();
            this.splitContainer3.SuspendLayout();
            this.m_menuStrip.SuspendLayout();
            this.splitContainer2.Panel1.SuspendLayout();
            this.splitContainer2.Panel2.SuspendLayout();
            this.splitContainer2.SuspendLayout();
            this.splitContainer4.Panel1.SuspendLayout();
            this.splitContainer4.Panel2.SuspendLayout();
            this.splitContainer4.SuspendLayout();
            this.SuspendLayout();
            // 
            // splitContainer1
            // 
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer1.Location = new System.Drawing.Point(0, 0);
            this.splitContainer1.Name = "splitContainer1";
            // 
            // splitContainer1.Panel1
            // 
            this.splitContainer1.Panel1.Controls.Add(this.splitContainer3);
            this.splitContainer1.Panel1.Controls.Add(this.m_menuStrip);
            // 
            // splitContainer1.Panel2
            // 
            this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
            this.splitContainer1.Size = new System.Drawing.Size(928, 632);
            this.splitContainer1.SplitterDistance = 315;
            this.splitContainer1.TabIndex = 0;
            // 
            // splitContainer3
            // 
            this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer3.Location = new System.Drawing.Point(0, 24);
            this.splitContainer3.Name = "splitContainer3";
            this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
            // 
            // splitContainer3.Panel1
            // 
            this.splitContainer3.Panel1.Controls.Add(this.m_htmlTreeView);
            // 
            // splitContainer3.Panel2
            // 
            this.splitContainer3.Panel2.Controls.Add(this.m_cssTreeView);
            this.splitContainer3.Size = new System.Drawing.Size(315, 608);
            this.splitContainer3.SplitterDistance = 288;
            this.splitContainer3.TabIndex = 2;
            // 
            // m_htmlTreeView
            // 
            this.m_htmlTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
            this.m_htmlTreeView.Location = new System.Drawing.Point(0, 0);
            this.m_htmlTreeView.Name = "m_htmlTreeView";
            this.m_htmlTreeView.Size = new System.Drawing.Size(315, 288);
            this.m_htmlTreeView.TabIndex = 1;
            this.m_htmlTreeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.m_htmlTreeView_BeforeSelect);
            // 
            // m_cssTreeView
            // 
            this.m_cssTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
            this.m_cssTreeView.Location = new System.Drawing.Point(0, 0);
            this.m_cssTreeView.Name = "m_cssTreeView";
            this.m_cssTreeView.Size = new System.Drawing.Size(315, 316);
            this.m_cssTreeView.TabIndex = 3;
            this.m_cssTreeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.m_cssTreeView_BeforeSelect);
            // 
            // m_menuStrip
            // 
            this.m_menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripMenuItem1,
            this.httpdesignstudiolookinatToolStripMenuItem});
            this.m_menuStrip.Location = new System.Drawing.Point(0, 0);
            this.m_menuStrip.Name = "m_menuStrip";
            this.m_menuStrip.Size = new System.Drawing.Size(315, 24);
            this.m_menuStrip.TabIndex = 1;
            this.m_menuStrip.Text = "menuStrip1";
            // 
            // toolStripMenuItem1
            // 
            this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.openToolStripMenuItem,
            this.toolStripMenuItem2,
            this.exitToolStripMenuItem});
            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
            this.toolStripMenuItem1.Size = new System.Drawing.Size(34, 20);
            this.toolStripMenuItem1.Text = "File";
            // 
            // openToolStripMenuItem
            // 
            this.openToolStripMenuItem.Name = "openToolStripMenuItem";
            this.openToolStripMenuItem.Size = new System.Drawing.Size(95, 22);
            this.openToolStripMenuItem.Text = "Open";
            this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
            // 
            // toolStripMenuItem2
            // 
            this.toolStripMenuItem2.Name = "toolStripMenuItem2";
            this.toolStripMenuItem2.Size = new System.Drawing.Size(92, 6);
            // 
            // exitToolStripMenuItem
            // 
            this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
            this.exitToolStripMenuItem.Size = new System.Drawing.Size(95, 22);
            this.exitToolStripMenuItem.Text = "Exit";
            this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
            // 
            // httpdesignstudiolookinatToolStripMenuItem
            // 
            this.httpdesignstudiolookinatToolStripMenuItem.Name = "httpdesignstudiolookinatToolStripMenuItem";
            this.httpdesignstudiolookinatToolStripMenuItem.Size = new System.Drawing.Size(116, 20);
            this.httpdesignstudiolookinatToolStripMenuItem.Text = "About DOLS Library";
            this.httpdesignstudiolookinatToolStripMenuItem.Click += new System.EventHandler(this.httpdesignstudiolookinatToolStripMenuItem_Click);
            // 
            // splitContainer2
            // 
            this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer2.Location = new System.Drawing.Point(0, 0);
            this.splitContainer2.Name = "splitContainer2";
            this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
            // 
            // splitContainer2.Panel1
            // 
            this.splitContainer2.Panel1.Controls.Add(this.m_webBrowser);
            // 
            // splitContainer2.Panel2
            // 
            this.splitContainer2.Panel2.Controls.Add(this.splitContainer4);
            this.splitContainer2.Size = new System.Drawing.Size(609, 632);
            this.splitContainer2.SplitterDistance = 312;
            this.splitContainer2.TabIndex = 0;
            // 
            // m_webBrowser
            // 
            this.m_webBrowser.AllowWebBrowserDrop = false;
            this.m_webBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
            this.m_webBrowser.IsWebBrowserContextMenuEnabled = false;
            this.m_webBrowser.Location = new System.Drawing.Point(0, 0);
            this.m_webBrowser.MinimumSize = new System.Drawing.Size(20, 20);
            this.m_webBrowser.Name = "m_webBrowser";
            this.m_webBrowser.ScriptErrorsSuppressed = true;
            this.m_webBrowser.Size = new System.Drawing.Size(609, 312);
            this.m_webBrowser.TabIndex = 0;
            this.m_webBrowser.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.m_webBrowser_DocumentCompleted);
            // 
            // splitContainer4
            // 
            this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer4.Location = new System.Drawing.Point(0, 0);
            this.splitContainer4.Name = "splitContainer4";
            // 
            // splitContainer4.Panel1
            // 
            this.splitContainer4.Panel1.Controls.Add(this.m_textBox);
            this.splitContainer4.Panel1.Controls.Add(this.m_selectorTextBox);
            // 
            // splitContainer4.Panel2
            // 
            this.splitContainer4.Panel2.Controls.Add(this.m_propertyGrid);
            this.splitContainer4.Size = new System.Drawing.Size(609, 316);
            this.splitContainer4.SplitterDistance = 327;
            this.splitContainer4.TabIndex = 1;
            // 
            // m_textBox
            // 
            this.m_textBox.Dock = System.Windows.Forms.DockStyle.Fill;
            this.m_textBox.Location = new System.Drawing.Point(0, 105);
            this.m_textBox.Multiline = true;
            this.m_textBox.Name = "m_textBox";
            this.m_textBox.ReadOnly = true;
            this.m_textBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
            this.m_textBox.Size = new System.Drawing.Size(327, 211);
            this.m_textBox.TabIndex = 3;
            // 
            // m_selectorTextBox
            // 
            this.m_selectorTextBox.Dock = System.Windows.Forms.DockStyle.Top;
            this.m_selectorTextBox.Location = new System.Drawing.Point(0, 0);
            this.m_selectorTextBox.Multiline = true;
            this.m_selectorTextBox.Name = "m_selectorTextBox";
            this.m_selectorTextBox.ReadOnly = true;
            this.m_selectorTextBox.Size = new System.Drawing.Size(327, 105);
            this.m_selectorTextBox.TabIndex = 4;
            // 
            // m_propertyGrid
            // 
            this.m_propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
            this.m_propertyGrid.Location = new System.Drawing.Point(0, 0);
            this.m_propertyGrid.Name = "m_propertyGrid";
            this.m_propertyGrid.Size = new System.Drawing.Size(278, 316);
            this.m_propertyGrid.TabIndex = 1;
            this.m_propertyGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.m_propertyGrid_PropertyValueChanged);
            // 
            // HTMLTreeDemo
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(928, 632);
            this.Controls.Add(this.splitContainer1);
            this.MainMenuStrip = this.m_menuStrip;
            this.Name = "HTMLTreeDemo";
            this.Text = "HTMLTreeDemo";
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel1.PerformLayout();
            this.splitContainer1.Panel2.ResumeLayout(false);
            this.splitContainer1.ResumeLayout(false);
            this.splitContainer3.Panel1.ResumeLayout(false);
            this.splitContainer3.Panel2.ResumeLayout(false);
            this.splitContainer3.ResumeLayout(false);
            this.m_menuStrip.ResumeLayout(false);
            this.m_menuStrip.PerformLayout();
            this.splitContainer2.Panel1.ResumeLayout(false);
            this.splitContainer2.Panel2.ResumeLayout(false);
            this.splitContainer2.ResumeLayout(false);
            this.splitContainer4.Panel1.ResumeLayout(false);
            this.splitContainer4.Panel1.PerformLayout();
            this.splitContainer4.Panel2.ResumeLayout(false);
            this.splitContainer4.ResumeLayout(false);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.SplitContainer splitContainer1;
        private System.Windows.Forms.MenuStrip m_menuStrip;
        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
        private System.Windows.Forms.SplitContainer splitContainer2;
        private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2;
        private System.Windows.Forms.WebBrowser m_webBrowser;
        private System.Windows.Forms.SplitContainer splitContainer3;
        private System.Windows.Forms.TreeView m_htmlTreeView;
        private System.Windows.Forms.TreeView m_cssTreeView;
        private System.Windows.Forms.SplitContainer splitContainer4;
        private System.Windows.Forms.TextBox m_textBox;
        private System.Windows.Forms.PropertyGrid m_propertyGrid;
        private System.Windows.Forms.TextBox m_selectorTextBox;
        private System.Windows.Forms.ToolStripMenuItem httpdesignstudiolookinatToolStripMenuItem;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
James S.F. Hsieh(Nomad Libra) Working as engineer for "Corel Intervideo" company situated in Taiwan.
He received his master degree in Graduate Institute of Network Learning Technology, National Central University, Taiwan in 2006.
His research interests are semantic Web services, intelligent software agent, machine learning, algorithm, software
engineering and multimedia programming.

Comments and Discussions