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

    Join Date
    May 2000
    Posts
    65
    Rep Power
    15
    Hi, I am looking for a programming script to parse a xml file. Can PHP do it. The xml file is from other web site and i need to parse it into my html page.

    Any one can help me!?Thanks.....
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    10
    Rep Power
    0
    can php parse XML .. ofcourse.. you dont need anything special to parse XML .. you can parse it without any special functions, etc.. or you can get some XML libraries, classes and use special functions to parse it. . I would use regex ...

    ---------------------
    Kryogen WebHosting - proud to be 100% Microsoft Free
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    65
    Rep Power
    15
    So, can you please give some idea how to parse the code below. The xml code is from other site

    ** http://p.moreover.com/cgi-local/page?index_biotech+xml

    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE moreovernews SYSTEM "http://w.moreover.com/xml/moreovernews.dtd">
    <moreovernews>
    <article id="_7262631">
    <url>http://c.moreover.com/click/here.pl?x7262629</url>
    <headline_text>Society discovers GM seeds in Orkney</headline_text>
    <source>Ananova</source>
    <media_type>text</media_type>
    <cluster>Biotech news</cluster>
    <tagline> </tagline>
    <document_url>http://www.ananova.com/news/index.html</document_url>
    <harvest_time>May 25 2000 3:12AM</harvest_time>
    <access_registration> </access_registration>
    <access_status> </access_status>
    </article>
    <article id="_7261612">
    <url>http://c.moreover.com/click/here.pl?x7261610</url>
    <headline_text>Is it practically possible to segregate GM and non-GM crops?</headline_text>
    <source>New Scientist</source>
    <media_type>text</media_type>
    <cluster>Biotech news</cluster>
    <tagline> </tagline>
    <document_url>http://www.newscientist.com/newsdrop/</document_url>
    <harvest_time>May 25 2000 12:37AM</harvest_time>
    <access_registration> </access_registration>
    <access_status> </access_status>
    </article>
    </moreovernews>

Similar Threads

  1. c problem parsing code
    By mharvey in forum C Programming
    Replies: 4
    Last Post: February 11th, 2004, 12:02 PM
  2. XML DOM and PHP Problem, not displaying wanted info
    By drazhargraig in forum PHP Development
    Replies: 2
    Last Post: February 3rd, 2004, 03:14 PM
  3. fread problem: doesn t compile php code
    By ghorghor2002 in forum PHP Development
    Replies: 2
    Last Post: February 3rd, 2004, 05:25 AM
  4. Creating xml files using php
    By Welshie21 in forum PHP Development
    Replies: 16
    Last Post: January 30th, 2004, 10:56 PM
  5. php code to use variables from the url
    By Nullified in forum PHP Development
    Replies: 2
    Last Post: January 30th, 2004, 02:19 PM

IMN logo majestic logo threadwatch logo seochat tools logo