www.webdeveloper.com
Results 1 to 3 of 3

Thread: Xml data fetching using php... help!

  1. #1
    Join Date
    Jan 2009
    Posts
    12

    Xml data fetching using php... help!

    I have an xml file.and i need fetch the data using php

    Code:
    <?xml version="1.0" encoding="UTF-8" ?> 
    <ALEXA VER="0.9" URL="way2sms.com/" HOME="0" AID="=">
     <RLS PREFIX="http://" more="203">
      <RL HREF="www.indyarocks.com/" TITLE="Indyarocks - Bringing India Together" /> 
      <RL HREF="www.atrochatro.com/" TITLE="AtroChatro.com" /> 
      <RL HREF="www.f9games.com/" TITLE="F9games - India's Largest Games Portal" /> 
      <RL HREF="www.ibibo.com/" TITLE="ibibo - create blogs, share opinions, questions & answers, sea" /> 
      <RL HREF="www.bigadda.com/" TITLE="BigAdda" /> 
      <RL HREF="www.youmint.com/" TITLE="YouMint: Free sms to India, send free sms, get paid to invite friends and receiv" /> 
      <RL HREF="www.bharatmatrimony.com/" TITLE="BharatMatrimony.com" /> 
      <RL HREF="www.indiaresults.com/" TITLE="India Results" /> 
      <RL HREF="tollywoodvideos.in/" TITLE="TOLLYWOOD VIDEOS" /> 
      <RL HREF="www.shine.com/" TITLE="Seeking Harmony in Neighborhoods Everyday (SHiNE)" /> 
      </RLS>
    <SD TITLE="A" FLAGS="DMOZ">
      <TITLE TEXT="Way2SMS" /> 
      <ADDR STREET="No:89, Road No:9," CITY="Hyderabad, AP 500038" STATE="" ZIP="" COUNTRY="india" /> 
      <PHONE NUMBER="914023546453" /> 
      <OWNER NAME="Way2sms.com" /> 
      <EMAIL ADDR="ceo@way2sms.com" /> 
      <LINKSIN NUM="61" /> 
      <SPEED TEXT="7453" PCT="7" /> 
      <POPULARITY URL="way2sms.com/" TEXT="1457" /> 
      <RANK DELTA="-486" /> 
      <CHILD SRATING="0" /> 
      <REACH RANK="1699" /> 
      </SD>
    </ALEXA>
    and now i want fetch the data from this file.i need to fetch the values such as PHONE NUMBER,OWNER NAME,EMAIL ADDR....seperately and store them in the database could any help me with some php code for fetching the data

    Thanks for all your support.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,528
    The DOM extension or the XMLReader extension can make parsing XML pretty easy.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Jan 2009
    Posts
    12

    Some example code

    Could you explain clearly with some example codes plz..Thank for your co-operation..........

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles