Link to home
Start Free TrialLog in
Avatar of Ken Lewis
Ken Lewis

asked on

XML UTF-8 in VB6

Hello!

I am writing a VB6 program to read an XML file.  The XML has encoding="UTF-8".

I have everything working with the exception of the embedded attachments.  There is a file name (jpg, doc, etc.) which I can pick up.  My problem is that the data element is just a bunch of characters.  Somehow I need to take the group of characters and convert it to a jpg or doc file.  

Does anybody know if this is possible,  and if so,  how is it done?

Thanks for your help!
ASKER CERTIFIED SOLUTION
Avatar of Chris Watson
Chris Watson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ken Lewis
Ken Lewis

ASKER

I brought it up and ran the Code Runner.  it creates a BIN file,  but I am not sure what to do with it after that.  I opened it with a text editor and the data is different that the .jpg file that I am supposed to having it look like.
I have the encoded data attached to this post so you can see what I am looking at.
image.txt
Try this, to work out if the string in question, is a base64 encoded jpeg.

Extract the portion of the XML you're interested in, just the data, no XML nodes, etc.

Save it as a text file and upload it to https://www.base64decode.org.

See what you get back.
It looks like base64 encoded data. base64decode.org doesn't bring back anything useful for your image.txt file. What does the documentation for the file you're trying to parse say on the matter?