Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

XML (WPL) Tool

Name: Anonymous 2006-04-06 20:02

helo world4ch
 
I want to create a txt/html file with only the filenames of a wpl-file.
looks like this:

<?wpl version="1.0"?>
<smil>
    <head>
        <meta name="Generator" content="Microsoft Windows Media Player -- 9.0.0.3344"/>
        <title>teh title</title>
    </head>
    <body>
        <seq>
            <media src="D:\teh file.mp3" tid="{fjfhdufkbhfudjkjfh}"/>
...

so what I need is a simple xml-tool that allows me to make a query for the "src"
or something that does it automatically
or a hint to let firefox doing it

Name: Anonymous 2006-04-07 10:40

Great !1. While you posted nice solutions I spent some more time to investigeate the masses and masses of information about xml and perl on the internet. Finally I found some nice tutorials and managed to produce a perl script with nearly null knowledge in perl. Now, I share it with you as you did. Thanks again, bye.

#!/usr/bin/perl -w

# use module
use XML::Simple;
use Data::Dumper;

# create object
$xml = new XML::Simple;

# read XML file
$data = $xml->XMLin("Favorites -- 4 and 5 star rated.wpl");

# access XML data
foreach my $media (@{$data->{body}->{seq}->{media}}){   
    print "$media->{src} \n";
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List