Dynamic generate javascript code

I have a project, written by java and js. I use java to parse xml file to generate js when the program running. In my opinion, dart will be compiled to js, so if I use flutter to parse xml file, the server needs to send the xml to browser, is it right?