###Perl + XML = How?###

Status
Not open for further replies.

jonmon6691

In Runtime
Messages
106
I need to use Perl to take an XML document and get a URL that is in the tag <pic></pic>, there are multiple instances of <pic> eg.
Code:
<root>
<child>
<pic>[url]http://www.somesite.com/image.jpg[/url]</pic>
</child>
<child>
<Pic fieldName="Pic" originalElement="img" src="[b]URL HERE[/b]" type="field"/>
</child>
</root>

there is also an unknown number of instances and there are other tags that should be ignored. If there is a module in Perl, i don't know what it is or how to use it so if you could give me a link to a comprehensive tutorial, and please, i already tried googleing it and i could not find anything useful.

I also need to download the picture from the urls found in the xml document.

ps i would rather not use re's (b/c i suck at them) :)
 
Wgas going on! is this forum dead! I've tried CPAN but im confused on how to use XML::parse is there ont that will create simple hashes or arrays or something that outlines the data in the xml doc.
 
Status
Not open for further replies.
Back
Top Bottom