Parsing HTML page information into database (copy/paste)

Hello everyone,

I need to parse out this web page information below and insert it into the database.  I think regular expression is the way to go.  All i want is to select the text with information I want and then copy and paste it into a textbox in my web application and then click import to import all of that information.  

Might give 500 if someone can help me with this. thanks.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well, there are a several ways to do it.

Regular expressions could be one way to go, although it could prove messy to sort out so much information with regular expressions alone.  I would probably parse the information either using an XML parser or by using the DOM itself to extract the chunks of information you're interested in.  After that, regular expressions would be good to extract the rest.

What are you using to build your web application?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
And, using an XML parser wouldn't work unless the page was XHTML compliant (which this page doesn't appear to be) -- you'd have to use DOM.
thiennhienAuthor Commented:
I am using ASP.NET web application to parse this.  I just want the user to select the data and copy/paste it in my web application.  IT would parse the information.  Another way is to view source and then copy/paste into my web app.  Could somebody gimme some code to start out with? Thanks.

It would be easy if you can figure out a fixed sequence of chars before and after the text you want to read...

for ex: <dsfa> dafs MY TEXT askdjkjhfasd

So if you want "MY TEXT" scan file contents for "<dsfa> dafs" and "askdjkjhfasd" and look for string in the middle..
this works most of the time.

Of course this is not a great way, but serves your purpose if you want a quick even though a dirty way...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.