Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by Anonymous Monk
on Oct 17, 2017 at 09:36 UTC ( #1201487=note: print w/replies, xml ) Need Help??


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

Hi, Thank you very much for your solution. It seems to work. It runs succesful through a short test. I guess the code does the following:

The internal subroutine _data_type of the module XML::Smart is used to determine if the content of an XML element should be treated as binary data. Everytime when the subroutine returns the value 2 (data type binary), the return value will set to the new value 4 (data type content, i.e. no binary data). So XML::Smart never uses Base64 Encoding. Is this explanation correct?

  • Comment on Re^2: XML::Smart - undesired decoding of special XML characters

Replies are listed 'Best First'.
Re^3: XML::Smart - undesired decoding of special XML characters
by Your Mother (Bishop) on Oct 17, 2017 at 12:37 UTC

    Almost. 4 is binary which is switched to 2, content, and anything else is passed through as is.

    Even if it works for you, I think you should be looking for alternatives in your XML handling.

    Update: and I'm not positive XML::Smart can't do this correctly. Someone might be able to get it to work for you. I just couldn't get it to, passed it encoded and decoded UTF-8 and it turned both into the binary encoding.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2019-02-23 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (119 votes). Check out past polls.

    Notices?