Loop over all children and subchildren of a space Xwiki

71 Views Asked by At

We are trying to migrate from Confluence and the macro time is not recognized by Xwiki when importing spaces. So I’m trying to create an application to change each macro like this one <time datetime="2021-01-29" class="date-past">29 Jan. 2021</time\> into an Xwiki date/time format.

I’m having trouble with the first step: going through all the children and sub-children in the space to inspect their content. Do you have any ideas on how to do this? Or a better solution to fix the missing time macro? I’m fairly new to Xwiki…

Thanks

1

There are 1 best solutions below

0
On

You can use XWiki's scripting capabilities (https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Scripting/) and the exposed API (https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Scripting/APIGuide/) in order to process each document.

Regarding the particular Confluence macro, it's not clear to me what it does (i.e. it just displays a date in some way or is it a date picker?) and which would be the XWiki equivalent, if any. Either way, you would have to transform it into something that XWiki can understand, possibly even a macro you may have to create for this particular exercise.