Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: XML::Smart - undesired decoding of special XML characters

by Your Mother (Bishop)
on Oct 16, 2017 at 14:28 UTC ( #1201448=note: print w/replies, xml ) Need Help??


in reply to XML::Smart - undesired decoding of special XML characters

This should explain your issue. :P

perl -le 'print "FALSE" ? "is true" : "is false"'

If it that's not clearing it up, try this.

$test->{log}->{logentry}[0]->{msg}->set_binary(0);

Replies are listed 'Best First'.
Re^2: XML::Smart - undesired decoding of special XML characters
by NeedForPerl (Novice) on Oct 16, 2017 at 16:39 UTC

    Thank you very much. It works fine. I know that it's a beginners mistake. I'm unfortunately not a professional perl programmer. But there is another problem. The structure of the XML document can become complex. A logentry can encapsulate further logentries and so on. So i have to recursively run through all the elements of the XML tree and call the function set_binary(0)? There are different elements within an logentry which could be decoded in Base64. Maybe the easiest way is to set every XML element as none binary. Maybe someone has an idea or solution how to easily achieve this. That would be very kind of you.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2019-02-21 05:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (109 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!