Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Perl converting some html entities when I don't want it to

by MorayJ (Acolyte)
on Sep 13, 2012 at 12:10 UTC ( #993476=note: print w/ replies, xml ) Need Help??


in reply to Perl converting some html entities when I don't want it to

Great - thanks for the help, both.

I am not using an XML writer, which is probably the root of the problem...I am using print.

I have the line print "$key_attrbs=\"$attrbs{$key_attrbs}\""; in a loop of the node to print out all its attributes.

I have now added above it: encode_entities $attrbs{$key_attrbs};, which seems to have done the trick.(with use HTML::Entities at the beginning)

I suspect this is not ideal, but it's working for me at the moment

Thanks a lot for the help

MorayJ


Comment on Re: Perl converting some html entities when I don't want it to
Select or Download Code
Re^2: Perl converting some html entities when I don't want it to
by MorayJ (Acolyte) on Sep 13, 2012 at 13:44 UTC

    ...although I would add, for other unwary travelers, that as it's html entities, it is converting things like the sign to £, which means the xml import still fails on that as it needs warning that you're going to be doing that.

    All in all, will be better in the long run to use an xml writer, though this works as a fix

    Thanks again

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-12-19 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (82 votes), past polls