Dynamicaly Generate XPage

Hello! Does anyone know how to generate Xpage programmatically using DOM on the server side?

Subject: That would be hard with the DOM

because the Notes API doesn’t provide any simple way to get and set the contents of an XPage. The Eclipse API in Designer, on the other hand, lets you access the XML contents of the XPage by access the design element as an IFile object, then you can getContent and setContent.