X
xjg
Guest
Hello, This may be a silly question but I was wondering if I could "add" a file within an XML file. I'm working in a development where I need to "attach" some files to an existing XML file to be later transferred to another system. I was thinking (and I've already done some steps) of creating some extra nodes in the XML file and just use the method MEMPTR-TO-NODE-VALUE( ) from the x-noderef class. However, in the receiving system, I'm having some issues when splitting the file into the original part and those "attachments". At first, in the sending side I just did: COPY-LOB FROM FILE 'myfile.pdf' TO mData. where mData is a memptr. Afterwards, I ran the memptr-to-node-value() and the try to split the file in the receiving side, but the file I was able to create seem corrupted and for sure had a smaller size..I couldn't open it. In my second attempt I added an BASE64-ENCODE(mData) and the memptr I passed to the x-noderef was binary data in the sending side. However, when trying to split the file I get "Invalid character data found in MEMPTR for codepage ISO8859-1 (12012)". Does someone know how I could fix this keeping in mind that my goal is just to send everything in this same XML file? Thanks in advance!
Continue reading...
Continue reading...