I'm not a jfx/visage compiler developer but my guess would be that you'll need to plug into the AST generated by the compiler, before it gets transformed into bytecode. I don't know if the current codebase has a plugin architecture, if not it certainly will be needed in order to target multiple platforms and languages. The jfx compiler wiki has a short description of the compiler architecture.
You could also get inspired by how groovy handles elegantly xml to the point of having a direct mapping between groovy code and xml. For example you could look at:
Groovy extensions and examples for Apache Pivot