PDA

View Full Version : Search website with C#



itSchRis917
12-11-2009, 05:45 AM
Hey, question for you guys. I need to search through the page source of a website to find the header.. Then what i want to do is mark that "position" and copy the next 50 or so lines into another string, and then parse those lines out individually in C#. I'm a complete beginner, so bear with me please. Thanks!

super_
12-12-2009, 01:29 AM
the header? as in HTTP header? or as in the HTML head element? if the first, tough luck; if the second, parse into a DOM tree or use the powerful visitor inspection design model as in SAX.

edit: if it's legal XML, you could use System.Xml to parse it into a DOM-style tree :-)

Freddy1990
12-16-2009, 07:31 PM
Don't use .NET, it's evil.

super_
12-22-2009, 05:15 PM
Don't use .NET, it's evil.

don't use delphi, it's evil, too.