Question

How to parse a library DB for my children's reading assignments.

Asked by: FUROG

Hello and thanks in advance for any guidance on my dilemma below.

Background
My children are currently in elementary school. They have AR (Accelerated Reading) books they are required to read outside the class and then test on them when they are finished. Each semester they have to accumulate points (set anywhere from 15 to 24).  They are given a reading level range (for example 3.5 to 5.2) for which they can pick and choose books from. Our struggle is to find the books in the library and make sure they never repeat the same book. My wife up to this point uses paper lists and memory.

What I am hoping can be accomplished (somehow...open to any suggestions).

This is the URL to the schools to choose from that gets updated periodically. http://www.readthebooks.com/rtb/files2/rtb_rowan/aliens/schools/XSchools.mv
We go to Woodleaf so we picked that school. So depending on the school, we would need to be able to select the school 1st and then complete the steps below.

This is the URL to all the books at Woodleaf schools. Not sorted and displaying apprximately 20 only.
http://www.classreading.com/rtb/RL_Books.mvc?Zfile=rtb_rowan&Zschool=RS_RL_18&schoolname=Woodleaf%20Elementary%20School&var2=OFF&YEAP=A0019

So, with the URL above I would want to keep parsing through all the pages and gathering the first 4 columns of data.

Then for each, I want to press the "Search Catalog" button (here is sample URL where it passes the title and author last name.... http://catalog.rowanpubliclibrary.org/TLCScripts/interpac.dll?Search&FormID=0&Config=pac&LimitsID=0&StartIndex=0&SearchField=16777216&SearchType=1&SearchData=the%2013th%20floor%20%20a%20ghost%20story%20and%20Fleischman)

With the catalog page displayed we are looking at the Location field (Headquarters only) and whether it is available or not.

Then, if it is available, we want to status the book as one we have read so in future lookups we don't checkout the same book. This would be good if we could status by name also. That way my son and daughter don't overlap with each other.

There doesn't seem to be an exposed web servicce we can use so I was thinking something simple like MS Access for the DB. The issue is how do I parse the data from the web? Is there a routine or spider or something I can use to extract the data?

Also, this doesn't necessarily have to be a MS Access DB application if someone has a better idea. I have capabilities to host a web application if that is a better idea.

Note: I am going to gladly share this with the other parents in the school system. Any help would be appreciated and I will give you big credits on the Splash into the application.


This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-09-23 at 08:00:32ID23755178
Tags

Microsoft

,

Access

,

2003

,

VBA

,

IE 7

,

Many

Topics

VB Database Programming

,

Parsers

,

PHP and Databases

Participating Experts
1
Points
500
Comments
4

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Children!
    This is prolly much easier than i think (well i hope so) but here it goes. Writing a program with a parrent window and all other forms are children that reside inside it. Now what I want to do is have a menu option that will open up a form for information to be entered in by...
  2. Treeview , QTY children
    Hi, how can I determine the TOTAL QTY of children under a specific parent node in a treeview, as well as the childrens index no's.
  3. want daughters hotmail passwords
    my daughter has been sending and receiving questionable matterial in her hotmail account and i wish i had her password. where can i find it within windows
  4. What sites are my children viewing
    I have a client who wants to find out if there is a way he can access the user account his daughter created to see what sites she has been surfing. The user has an administrator account but so does his daughter. The daughters account is password protected and they are on XP. ...
  5. Treeview -> Count fellow children
    I know we can return the number of fellow children with node.parent.children But I need to count the first level of children Example of treeview Dad - son - something Mum - Daughter - something So if i click Dad, i want to return 2 Cheers! Dave :-)

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: routinetPosted on 2008-09-23 at 11:39:38ID: 22552552

If you're doing this in PHP, you can use the curl library to pull the pages:

http://www.php.net/manual/en/ref.curl.php

In the querystring for the tables, the var1 variable seems to indicate A-Z (AA for the '#' entry).  Using the base querystring for the first page, you should be able to create the links necessary to grab them one at a time.

As far as parsing the content, you can either parse it the hard way through regex, but that could fail if the format of the page ever changes.  Instead, try the DOM classes for PHP:

http://www.php.net/dom

Once you have a page's HTML from curl, load that string into a DOM instance with:

http://www.php.net/manual/en/domdocument.loadhtml.php

Then it's just a matter of drilling down into the document to find the table you need, and begin a row-by-row extraction.  This all sounds very easy in theory, but I've never used the class myself, so I'm not sure how well it would go with the implementation.  I'm happy to help experiment, though..  :)

 

by: FUROGPosted on 2008-09-23 at 11:57:00ID: 22552712

Thanks for the quick reply.

To be honest, I have no clue on the PHP but realized there was probably a good way using the method. If you have any coding experience that can lend to this solution you proposed then that would be grateful.  My weakness comes in parsing the pages and getting it to a DB (mySQL or otherwise). Once there I, like most, have ample tools to extract and manipulate.

So if you have any idea how to code the extraction, parsing and insertion into the DB please let me know.

Is tis too much to ask? If so, I can take it out and ask for it to be done commercially. Any savings in time for my wife and other parents would be worth a little investment I guess.

 

by: routinetPosted on 2008-09-23 at 14:20:23ID: 22554235

If I was doing something quick, I'd be using regex to search the source.  For example, that menu with #,A-Z at the top is known text.  You search for that, then search for the next table appearing after it.  Within that table, each <tr>..</tr> is one book, with the first three <td>..</td> pairs holding the info.  You can see the regular expression functions here (I prefer the PCRE extension):

http://www.php.net/manual/en/ref.pcre.php

There's also a lot white-space in the source.  Before doing anything, I'd filter out any lines having only white-space.  Something like this should do it:

$new_source = preg_replace('/^[[:space:]]*$/','',$old_source);

That assumes the entire source was loaded into $old_source, possibly by using file_get_contents().

The main focus at the start should be reading and scanning that table.  As you identify the rows, isolate the information found in the first three columns, and use an INSERT statement to drop it in the database.  Do that for each row on the page, then for each page in the #,A-Z collection.

 

by: FUROGPosted on 2008-09-24 at 06:26:07ID: 22559401

OK, let me look at both options and experiment. I will let you know soon what I used in the final.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...