How can i do this ?

Discussion in 'Programming' started by m3tsys, Dec 23, 2009.

  1. #1
    m3tsys, Dec 23, 2009 IP
  2. shall

    shall Member

    Messages:
    111
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #2
    you need a xml parser, you have a variety of parsers, depending on which programming language you use :)
     
    shall, Dec 23, 2009 IP
  3. m3tsys

    m3tsys Greenhorn

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    what you recomend me in php?
     
    m3tsys, Dec 23, 2009 IP
  4. shall

    shall Member

    Messages:
    111
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #4
    Please look at this link

    http://www.kirupa.com/web/xml_php_parse_beginner.htm
    HTML:
    you should open the xml file in browser and view the source code, or download it to your pc. The xml is simple.

    here is another link
    http://www.criticaldevelopment.net/xml/doc.php
    HTML:
     
    shall, Dec 24, 2009 IP
  5. dreteh

    dreteh Member

    Messages:
    514
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    33
    #5
    Try this:

    $doc = new DOMDocument();
    $doc->load("http://www.myhoroscop.ro/feeds.xml");
    $linkArray = array();

    foreach ($doc->getElementsByTagName('item') as $node)
    {
    $link = $node->getElementsByTagName('link')->item(0)->nodeValue;

    $linkArray[] = $link;
    }
     
    dreteh, Dec 24, 2009 IP
  6. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    NeoCambell, Dec 26, 2009 IP
  7. buldozerceto

    buldozerceto Active Member

    Messages:
    1,137
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #7
    Use simple pie rss, it is the best around.
     
    buldozerceto, Dec 26, 2009 IP