On 06/22/2011 08:45 PM, Mark Wallace wrote:
Hi everyone. I'm looking for a programmatic way to generate XWiki pages that include objects.
I have looked at generating XAR files for import, but am wondering if there are other ways to generate pages from code with no user interaction. Any pointers would be appreciated.
You can either use the public API [1] to create documents, directly from inside the wiki in a velocity (or groovy, python) script. You can also use a remote access protocol to push new documents, via REST [2], which is the most complete API, or XmlRpc [3] or WebDAV [4]. If you have more complex needs, like importing from external data sources, you can even write a Java component [5] that uses the internal XWiki services plus any other libraries you need to create and store new documents. [1] http://platform.xwiki.org/xwiki/bin/DevGuide/API [2] http://platform.xwiki.org/xwiki/bin/Features/XWikiRESTfulAPI [3] http://platform.xwiki.org/xwiki/bin/Features/XMLRPC [4] http://platform.xwiki.org/xwiki/bin/Features/WebDAV [5] http://platform.xwiki.org/xwiki/bin/DevGuide/WritingComponents -- Sergiu Dumitriu http://purl.org/net/sergiu/