SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast OReason's Avatar
    Join Date
    Jun 2003
    Location
    Eindhoven, The Netherlands
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Which XML Parser to use for this situation?

    Hi,

    Say for example I want to grab stuff from the following page:
    http://killbridge.com/

    Let's say I want to access the "Graphic Design" part. Here's the structure:
    http://www.vuilnisbelt.com/dump/1152637033.png

    So it would translates to PHP-code like this:
    Code:
    $array['HTML']['BODY']['DIV'][1]['DIV']['DIV'][1]['UL']['LI'][1]
    (if there's a same kind of tag at the same level, there's another dimension added to make clear which tag is meant)

    Which XML parser lets me access pages using the method described above?

    I've tried some PHP5 functions, MiniXML and some functions found on this forum. I couldn't get it to work.

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SimpleXML does something like this, just with objects instead of arrays.


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
  •