You can find example about how to read and write data into EJS at

Simulations/_examples/TechnicalExamples/_WritingAndReading.xml