Is there a standard way of saving "attachment files" in xml? I have looked and it seems like most people recommend base64 encoding binary data.
So can someone critique my workflow thoughts for attaching files and retrieving them later on from xml?
attach files workflow:
1) user selects the file to attach
2) store the file in memory as a byte stream
3) use some kind of API to base64 encode the byte stream into a
String 4) write out the string to xml
retrive file and display workflow:
1) retrieve the String from xml
2) convert to a byte stream using base64 decoding API
3) write out the byte stream to a temp file
4) call high level API to open the file using whatever program the OS associates with the file extension
Any help is appreciated! Also, is there a standardized tagging convention for storing attachments in xml?