I tried it and got no output. Did you fix something in my code?
I did add a statement to output the list of elements from the shallow parse regex. As far as I can tell, it split out the elements correctly, but it left the embedded newlines in the mark-up elements.
For example, the following:
</div
>
became </div\n>
In the case of the Sunday div:
<div title=" class='data' id='Foo'>Bar"
id="Seven" class="data"> Sunday</div>
became:
<div title=" class='data' id='Foo'>Bar"\nid="Seven" class="data">
 Sunday
</div>
So, I added tr/\n/ / for (@elements); to get rid of the embedded newlines. Still no output (other than the dump of the elements list).
I did encounter an unexpected error: Variable "$XML_SPE" is not imported at extractor.pl line 46. So, I changed:
my @elements = $xml =~ /$XML_SPE/g;
to:
my @elements = $xml =~ /$::XML_SPE/g;
I don't have time to try to debug my code, now. Will try, later.
Current code:
And the output:
|