Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Spreadsheet::XLSX returning &lt; &gt; and &amp; instead of < > &

by runrig (Abbot)
on Mar 07, 2013 at 21:47 UTC ( #1022304=note: print w/ replies, xml ) Need Help??


in reply to Re: Spreadsheet::XLSX returning &lt; &gt; and &amp; instead of < > &
in thread Spreadsheet::XLSX returning &lt; &gt; and &amp; instead of < > &

...rewrite Spreadsheet::XLSX using a sane XML parser, like XML::LibXML.

Work in progress.


Comment on Re^2: Spreadsheet::XLSX returning &lt; &gt; and &amp; instead of < > &
Re^3: Spreadsheet::XLSX returning &lt; &gt; and &amp; instead of < > &
by psynk (Initiate) on Mar 08, 2013 at 13:10 UTC
    Likely beyond my Perl skill level at the moment, but I'll keep it in mind. Meanwhile, I wrote a small function to fix the data. I also found code strings in the original data that we decided needed fixin', so this function might be all I need at the moment.

    sub FixXML { $parm = $_[0]; $parm =~ s/&amp;/&/g; $parm =~ s/&gt;/>/g; $parm =~ s/&lt;/</g; $parm =~ s/&quot;/"/g; $parm =~ s/&apos;/'/g; $parm =~ s/&#xA;/\n/g; $parm =~ s/&#xa;/\n/g; $parm =~ s/&#xD;/\r/g; $parm =~ s/&#xd;/\r/g; $parm =~ s/&#x9;/\t/g; return($parm); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2014-07-10 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (212 votes), past polls