I am trying to export a javascript design element to a file in a Java agent. The problem is that if I set the ForceNoteFormat of the DXL exporter to false, I get DXL output where I can find the javascript code inside the javascript tag. I cannot use this because it is encoded with UTF-8 and it breaks the script if invalid characters are found, for example '>' inside string manipulation.
So, my second attempt was to set ForceNoteFormat to true, then the code is available in the "rawitemdata" tag, so I decrypted the Base64 string and the problem was solved, in addition, it also contains some header information, I think.
I found almost the same problem here, but it's about extracting images from base64 decoded DXL: http://lekkimworld.com/2006/03/17/helping_out_a_fellow_blogger_getting_the_actual_bytes_of_an_image_resource_a_lesson_in_the_intricacies_of_dxl_representation
Can someone point me in the right direction, how can I get a clean pristine script from exported DXL?
source share