Read from txt/xml file to button(send txt to resolume)

Hello community!
Wek ago i find this awesome software, and whith help of this forum i wrote buttons that i need for using resolume. But i stuck with one difficult (for me) task. What i need: There is some txt/xml file with question and persentage of count answers, and i have graphic clip with text block in resolume(example)

. I need that txt information parsing to txt field in resolume. I find that if i create text widget and whrite adress of resolume text block i can whrite it and it's apear in resolume (pic resol2 and resol3) . and if i use file widget and select txt file it send only path to file to resolume ( pic resol4 and resol5) . Then i find some script that can read from file, but i dont understad how i need to edit it(
Can somebody tell me some forum or information about how to do this, is there such possibility at all or do i need to write a module?
Thank in advance!
all screenshots File Sharing and Transfer - Send Large Files via FEX.NET

script that i found:
`<!DOCTYPE html> `

`<html> `

` `

`<head> `

`    ` `<title>Read Text File</title> `

`</head> `

` `

`<body> `

`    ` `<input type=` `"file"` `name=` `"inputfile"`

`            ` `id=` `"inputfile"` `> `

`    ` `<br> `

`  `

`    ` `<pre id=` `"output"` `></pre> `

`     `

`    ` `<script type=` `"text/javascript"` `> `

`        ` `document.getElementById(` `'inputfile'` `) `

`            ` `.addEventListener(` `'change'` `, ` `function` `() { `

`             `

`            ` `var` `fr=` `new` `FileReader(); `

`            ` `fr.onload=` `function` `(){ `

`                ` `document.getElementById(` `'output'` `) `

`                        ` `.textContent=fr.result; `

`            ` `} `

`             `

`            ` `fr.readAsText(` `this` `.files[0]); `

`        ` `}) `

`    ` `</script> `

`</body> `

` `

I think you can’t use getElementById. I started with parsing files from the example:
https://openstagecontrol.ammd.net/docs/custom-module/examples/

Thanks to node.js…

I used fs.readdirSync and fs.readFile, you have to use a custom module for that.

Hope this helps a bit…

@abstrus is right, you need to write a custom module to read/write files, widget can’t do that on their own.