The built-in function, ng:base64EncodeFile() converts the binary contents of a file into base64. This can e.g. be used, if you want to insert any kind of data into an XML node, without substituting any characters, that are not allowed.
This function is related to the functions: ng:base64, ng:base64ToUTF8 and ng:base64EncodeResource
This can e.g. be used, if you want to insert dynamic images directly in the contents of an email.
Here is an example:
ng:base64EncodeFile('D:\temp\Myfile.txt')
This returns the base64 encoded data, that is found in the file,
D:\temp\Myfile.txt
If the file e.g. contains the text:
InterForm
Then the function returns the equivalent base64 data stream:
SW50ZXJGb3Jt
Related Articles
ng:resourceExist
This function checks, if a resource in InterFormNG2 exists or not. The function returns a boolean: true or false. The ng:resourceExist Xpath function has this format: ng:resourceExist(resource,path) where: resource Resource is the type of resource in ...
ng:decrypt
The built-in function, ng:decrypt is linked with the encryption functions: ng:encrypt and the workflow component, Set secure workflow variable. The function, ng:decrypt() can decrypt contents, that was previously encrypted with these functions. The ...
ng:minimum
InterFormNG2 includes the special built-in XPath function, ng:minimum. This function returns the smallest value of two numeric arguments. The function only accepts two numeric arguments - no more and no less. Examples: ng:minimum(-14,2) returns: -14 ...
ng:base64
The built-in function, ng:base64() converts a string (text) into a base64 based string. This can e.g. be used, if you want to insert any kind of data into an XML node, without substituting any characters, that are not allowed. This function is ...
ng:spaceConcat
The built-in function, ng:spaceConcat(), helps concatenate two strings with a space character automatically inserted between them. Here is an example: This XPath expression: ng:spaceConcat('First name:', 'Jon') outputs this string: First name: Jon ...