I get the same XML::Simple behavior as you. I got tired of waiting for the program to end and broke it. That put my machine into a wierd state and I was forced to reboot. (damn win2k).
I then wrote a little XML::SAX routine to see what was happening (see below). Doesn't XML::Simple and XML::SAX both use XML::Parser under the hood? Anyways, I appears that once it gets to the data element the character sub gets called once for each line of data, 76 chars, and then once again for each newline. This continues for some time, but it does finish with the data element containing 8786162 chars.
use strict; use warnings; use XML::SAX; my $h = Handler->new(); my $p = XML::SAX::ParserFactory->parser(Handler => $h) or die "Unable to get XML SAX parser object"; $p->parse_uri("10.xml"); BEGIN { package Handler; sub new { my $class = shift; bless({chars => ''}, ref $class || $class); } sub start_element { my ($this, $data) = @_; $this->{chars} = ''; print "start $data->{Name}\n"; } sub end_element { my ($this, $data) = @_; print "end $data->{Name} = ", length($this->{chars}), "\n"; $this->{chars} = ''; } sub characters { my ($this, $data) = @_; my $chars = $data->{Data}; $this->{chars} .= $chars; print "characters ",length($chars),"\n"; } }
Here's a sample of the output...
start assets characters 1 characters 2 start media characters 1 characters 4 start site characters 4 end site = 4 characters 1 characters 4 start name characters 15 end name = 15 characters 1 characters 4 start description end description = 0 characters 1 characters 4 start priority characters 1 end priority = 1 characters 1 characters 4 start publish_status characters 1 end publish_status = 1 characters 1 characters 4 start active characters 1 end active = 1 characters 1 characters 4 start source characters 4 end source = 4 characters 1 characters 4 start uri characters 58 end uri = 58 characters 1 characters 4 start cover_date characters 35 end cover_date = 35 characters 1 characters 4 start category characters 21 end category = 21 characters 1 characters 4 start output_channels characters 1 characters 6 start output_channel characters 8 end output_channel = 8 characters 1 characters 4 end output_channels = 5 characters 1 characters 4 start keywords end keywords = 0 characters 1 characters 4 start contributors end contributors = 0 characters 1 characters 4 start elements characters 1 characters 6 start data end data = 0 characters 1 characters 6 start data characters 17 end data = 17 characters 1 characters 6 start data end data = 0 characters 1 characters 6 start data end data = 0 characters 1 characters 6 start data end data = 0 characters 1 characters 6 start data end data = 0 characters 1 characters 6 start data end data = 0 characters 1 characters 6 start data end data = 0 characters 1 characters 6 start data end data = 0 characters 1 characters 6 start data end data = 0 characters 1 characters 4 end elements = 5 characters 1 characters 4 start file characters 1 characters 6 start name characters 22 end name = 22 characters 1 characters 6 start size characters 7 end size = 7 characters 1 characters 6 start data characters 76 characters 1 characters 76 characters 1 ... this repeats for a long time characters 76 characters 1 characters 76 characters 1 end data = 8786162 characters 1 characters 4 end file = 5 characters 1 characters 2 end media = 3 characters 1 end assets = 1

In reply to Re: XML::Simple hangs by mifflin
in thread XML::Simple hangs by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.