Please enable JavaScript to view this site.

Altova XMLSpy 2020 Professional Edition

The XML | Insert | Encoded External File command is available in Grid View only. It inserts a binary encoded file, such as an image file,  as encoded characters. The encoded external file is inserted before the Grid View selection.


On clicking the command, the Insert Encoded External File dialog (screenshot below) pops up. In it you enter the path to the file, select the encoding you want, and specify whether the encoded file is to be inserted in an element or not.


You can browse for or enter the name of the external file to be encoded and embedded. Either a Base-16 or Base-64 encoding must be specified. If you wish to enclose the encoded text in an element, then check the Create Element check box and specify the name of the desired element in the Create Element text box. If the Create Element check box is not checked, then the encoded text will be inserted directly at the cursor location.


On clicking OK, the encoded text of the selected file is inserted at the cursor location, with an enclosing element if this has been specified.


The encoded file is inserted in Grid View (the highlighted element in the screenshot below).


In Text View, the file will be inserted as below.


<img ext="jpg" encoding="xs:base64Binary">






The listing above shows the encoded text of a JPG image file. An img element was created around the encoded text.


© 2019 Altova GmbH