Hallo, ich will eine XML-Datei mithilfe eines skriptes auslesen doch ich bekomme das einfach nicht hin. Es geht um folgende Datei: ~/.local/share/rhythmbox/playlists.xml
Sie ist wie folgt ausgebaut:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <?xml version="1.0"?> <rhythmdb-playlists> <playlist name="Warteschlange" type="queue"/> <playlist name="Beste Bewertung" type="automatic" sort-key="Rating" sort-direction="1"> <conjunction> <equals prop="type">song</equals> <subquery> <conjunction> <greater prop="rating">4.000000</greater> </conjunction> </subquery> </conjunction> </playlist> <playlist name="list1" type="static"> <location>file:///home/alexander/file1.mp3</location> <location>file:///home/alexander/file2.mp3</location> </playlist> <playlist name="list2" type="static"> <location>file:///home/alexander/file3.mp3</location> <location>file:///home/alexander/file4.mp3</location> </playlist> </rhythmdb-playlists> |
Playlisten, die nicht vom Typ "static" sind sollen ignoriert werden. nacher soll das skript zwei dateien erstellen:
list1:
/home/alexander/file1.mp3 /home/alexander/file2.mp3
list2:
/home/alexander/file3.mp3 /home/alexander/file4.mp3
Hat jemand ne idee wie das skript aussehen kann? ich bekomms einfach nicht hin =(
Grüße und schonmal tausend dank! =)