Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    17

    estrazione dati da un file xml

    Ciao lo sò che ce ne sono tante di guide che ne parlano ma le informazioni che devo estrapolare non sono su un file xml semplice ma abbastanza articolato.
    mi servirebbe uno script (di qualunque genere) che mi estrapoli la variablie link da questo file xml


    <?xml version="1.0" ?>
    - <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    - <channel>
    <title>The Pirate Bay - All categories</title>
    <link>http://www.thepiratebay.org/</link>
    <description>The newest torrents from The Pirate Bay.org</description>
    <language>en-us</language>
    <pubDate>Sat, 07 Jan 2006 17:26:26 +0100</pubDate>
    <lastBuildDate>Sat, 07 Jan 2006 17:26:26 +0100</lastBuildDate>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>TPB RSS Generator 1.0</generator>
    - <item>
    <title>BiG PuN Capital Punishment</title>
    <link>http://static.thepiratebay.org/down...851.TPB.torrent</link>
    <comments>http://thepiratebay.org/details.php?id=3428851</comments>
    <pubDate>Sat, 07 Jan 2006 16:24:31 +0100</pubDate>
    <dc:creator>el13e</dc:creator>
    <guid>http://static.thepiratebay.org/down...851.TPB.torrent</guid>
    </item>
    - <item>
    <title>Slysoft Anydvd 5.8.1.1</title>
    <link>http://static.thepiratebay.org/down...850.TPB.torrent</link>
    <comments>http://thepiratebay.org/details.php?id=3428850</comments>
    <pubDate>Sat, 07 Jan 2006 16:23:47 +0100</pubDate>
    <dc:creator>akncg</dc:creator>
    <guid>http://static.thepiratebay.org/down...850.TPB.torrent</guid>
    </item>
    - <item>
    <title>Chesky - Audiophile Test Disc Vol.2</title>
    <link>http://static.thepiratebay.org/down...849.TPB.torrent</link>
    <comments>http://thepiratebay.org/details.php?id=3428849</comments>
    <pubDate>Sat, 07 Jan 2006 16:22:12 +0100</pubDate>
    <dc:creator>Fresk</dc:creator>
    <guid>http://static.thepiratebay.org/down...849.TPB.torrent</guid>
    </item>
    - <item>
    <title>WWE Smackdown 01.06.06 XviD MDE</title>
    <link>http://static.thepiratebay.org/down...848.TPB.torrent</link>
    <comments>http://thepiratebay.org/details.php?id=3428848</comments>
    <pubDate>Sat, 07 Jan 2006 16:12:16 +0100</pubDate>
    <dc:creator>wwefan</dc:creator>
    <guid>http://static.thepiratebay.org/down...848.TPB.torrent</guid>
    </item>
    - <item>
    </channel>
    </rss>


    ho provato con la guida in flashmx ma ho qualche problema con trovare i nodi giusti.
    grazie

  2. #2
    a parte che l'XML di esempio che hai postato contiene informazioni warez e in questo forum non è argomento tollerato...

    cmq sia

    this.data_xml=new XML();
    this.data_xml.onLoad=function(tutto_ok) {
    if(tutto_ok) {
    var base_xml=this.firstChild.firstChild;
    var link_value=base_xml.childNodes[1].firstChild.nodeValue;
    trace("Evviva: "+link_value)
    } else {
    trace("problemi di connessione")
    }
    }
    this.data_xmlload("miofile.xml");
    this.data_xml.ignoreWhite=true;
    "La consapevolezza di Case suddivisa come perle di mercurio. La sua visione era sferica, come se una singola retina rivestisse la superficie interna di un globo che conteneva tutte le cose, se tutte le cose si potevano contare." —Neuromante, William Gibson (1984)

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.