Click here to get back home

XML::Simple does not pick up multiple entries into array

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
XML::Simple does not pick up multiple entries into array jck000@gmail.com 04-10-2008
Posted by jck000@gmail.com on April 10, 2008, 4:04 pm
Please log in for more thread options
I'm parsing data and one of there are multiple EMBEDDED_FILE tags.
I've set it to put these into an array as well as a hash. However,
only one entry appears

$ref = XMLin($xml_src,
ForceArray => [ 'EMBEDDED_FILE' ],
SuppressEmpty => '');


This is the result. I can view the source and there are multiple
EMBEDDED_FILE tags. So, <EMBEDDED_FILE _type='HTML'>
<DOCUMENT>
<![CDATA[<!DOCTYPEML....>
</DOCUMENT>
</EMBEDDED_FILE>
<EMBEDDED_FILE _type='PDF' EncodingType='Base64'>
<DOCUMENT>
<![CDATA[JVBERi0xLj........>
</DOCUMENT>
</EMBEDDED_FILE>

This is the result:

'EMBEDDED_FILE' => [
{
'DOCUMENT' => '',
'_Type' => 'HTML'
}
],

When there is a single entry usually PDF, I can decode it properly.
Is there an option to force it to correctly interpret the two entries?

Thanks
Jack

Similar ThreadsPosted
How To Pick Winning Stocks June 14, 2006, 11:41 pm
Pod syntax and hyperlinks to =item entries December 8, 2005, 8:37 pm
ANNOUNCE: Set::Array V 0.13 April 9, 2006, 12:25 am
ANNOUNCE: Set::Array V 0.14 April 10, 2006, 6:11 am
How to get an OLE array of objects? August 17, 2006, 6:33 pm
multidimensional array assignment March 15, 2006, 1:30 am
Soap::Lite Cant get array of results? March 30, 2005, 12:43 am
Module namespace: Tie::Flatfile::Array February 25, 2007, 11:55 pm
Announce: Set::Array, Set::Hash, Set::String - new maintainer January 8, 2005, 10:04 am
BerkeleyDB Queue Database Array Size August 14, 2006, 2:50 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap