SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2000
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    table parser class?

    Does anyone know of a class that can parse tables to extract data?

    There are quite a few classes I've found that can create tables, but I am looking for one that takes data out of tables.

    Anyone know of any?

  2. #2
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Think it's unlikely you'll find one. Generally the only situation where you'd do that is grabbing pages from someone elses site and generally that kind of thing, the target site will provide an XML file for you to read.

    It shouldn't be too hard for you to write a script using str_replace for example though, that converts table into something like a CSV file, which you can then easily manipulate.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2002
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may be able to get ideas from the following article:

    Creating a "Text Version" Web Page On-the-fly

    http://www.zend.com/zend/tut/tutorial-thome.php

    It deals with parsing through html tags (table, etc.) to parse out data.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •