1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Rep Power
    Hi, every body.....

    I have one file call content.xml (example)and inside got...

    <xml version="1.0">
    <title>PHP And You</title>
    <author>Some one</author>
    <title>Visual Basic</title>
    <author>King kong</author>
    <title>JS Expert</title>

    how can i read the file and print the book title,price,author and isdn without the tag(<element>.....</element>

    I need your help please, thanks first.....
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Perth West Australia
    Rep Power
    ereg("<title>(.*)</title>",$string,$newstring );

    But first you need to read the whole file - stripout the useless stuff and then explode the items to an array.

    I have just done a parser for the devshednews.rdf and thats pretty much the way I did that.


    Simon Wheeler
    FirePages -DHTML/PHP/MySQL

Similar Threads

  1. Replies: 1
    Last Post: December 20th, 2003, 12:22 PM
  2. unable to parse xml using servlet
    By babloosony in forum Java Help
    Replies: 2
    Last Post: December 8th, 2003, 06:40 AM
  3. compile vhosts
    By the-griff in forum Linux Help
    Replies: 0
    Last Post: November 5th, 2003, 08:07 PM
  4. PHP XML Parsing
    By iwarner in forum PHP Development
    Replies: 0
    Last Post: November 4th, 2003, 06:01 AM
  5. How can I parse Word Documents and export to XML??
    By Westside in forum XML Programming
    Replies: 1
    Last Post: October 27th, 2003, 04:35 AM

IMN logo majestic logo threadwatch logo seochat tools logo