get data from xml

L

Larry

Hi,

Allthough I could use some great XML module from cpan, I would
like to get data from the following xml file by using regexp:

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key></key>
<dict>
<key>1</key>
<dict>
<key>Track ID</key><integer>1</integer>
<key>Name</key><string>Brano 1</string>
</dict>
<key>2</key>
<dict>
<key>Track ID</key><integer>2</integer>
<key>Name</key><string>Brano 2</string>
</dict>

...etc...

</dict>
</dict>

I would like to get this and so forth:

<dict>
<key>Track ID</key><integer>1</integer>
<key>Name</key><string>Brano 1</string>
</dict>

sadly, i don't know how to go about it...

any help'll be appreciated

thanks
 
J

Jürgen Exner

Larry said:
Allthough I could use some great XML module from cpan, I would
like to get data from the following xml file by using regexp:

XML is not a regular language, therefore using a tool that is by design
limited to regular languages is flawed at best.(1)
sadly, i don't know how to go about it...

Me neither. If you find a solution you may want to contact the ACM. It would
be a candidate for a Turing Award.

jue

(1): Yes, I know there are extensions in Perl's REs that make them more
powerful than plain regular. But still: trying got parse XML using REs is
ridiculous.
 
D

Dr.Ruud

Larry schreef:
Allthough I could use some great XML module from cpan, I would
like to get data from the following xml file by using regexp:

There is nothing to like there, so please move on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top