Beispiel #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            XDocument xml;

            try
            {
                Utility.HtmlUtil htmlUtil = new Utility.HtmlUtil();
                xml = htmlUtil.ParseHtml(this.textBox1.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }

            var ns = xml.Root.Name.Namespace;

            var q =
                from s in xml.Descendants(ns + "tr")
                select s;

            foreach (var s in q)
            {
                //Console.WriteLine(s.Value );
                foreach (var s2 in s.Descendants())
                {
                    Console.WriteLine(s2.Value);
                }
            }


            Utility.FinanceUtil finance = new Utility.FinanceUtil();
            dividendEntityBindingSource.DataSource = finance.GetDividendEntityList();
        }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     Utility.HtmlUtil htmlUtil = new Utility.HtmlUtil();
     this.textBox1.Text = htmlUtil.GetHtml(this.textBox2.Text);
 }