Online documentation - Websydian v6.1 |
Product | Websydian TransacXML developer |
---|---|
Version | 5.5SP1, 5.6 |
Category | Development |
Question | How to embed binary information like images into a XML file |
Answer | This is not part of the Websydian TransacXML product, but there
is a way.
In order to embed binary information (pictures are binary) you will need to perform a base64 encoding of the information. http://www.kbcafe.com/articles/HowTo.Base64.pdf
The simple element that will hold the base64 encode data string is modeled like this XMLBase64.Fields.Base64Field is a FLD NameSpaceAware XMLBase64.Fields.Base64Field is a FLD ElementField
where the source code namespace should hold urn:schemas-microsoft-com:datatypes and the prefix source code should hold dt
You will need to create a simple element with an attribute http://www.websydian.com/websydiandoc/Libraries/WsyXml/SimpleElementWithAttribute.htm adding an attribute named dt with the value bin.base64
The final xml document holding the base64 data information should look like this
<MYPICTURE xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">[here is the binary data in a base64 encoded data string]</MYPICTURE>
The information that is added to the element is the output from the base64 encoding procedure.
If you need any further help I will need to ask you to request a quote for consultansy assistance.
|