Hi Marius,
Thanks for your answer.
I've been explorer the XWikiDocument path but I wasn't able to easily
extract the parser stuff and ended with almost all XWiki jars in my project
build path.
My goal is to keep a lightweight approach so I started looking at the
XWikiParser classes.
As for now I'm able to parse a page and know how many sections are in it.
But I need to look at it more closely to be able to retrieve the whole
sections contents without redefining every WemListener's methods.
IWikiParser parser = new XWikiParser();
parser.parse(new StringReader(page), new EmptyWemListener() {
@Override
public void beginSection(int docLevel, int headerLevel, WikiParameters
params) {
System.out.println("section " + docLevel + "-" + headerLevel);
System.out.println(params);
}
@Override
public void beginSectionContent(int docLevel, int headerLevel,
WikiParameters params) {
System.out.println("sectioncontent " + docLevel + "-" +
headerLevel);
System.out.println(params);
}
});
If you have tips or advices, they're very welcome.
Regards,
Stephane
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Retrieve-modify-page-sections-with-Rest-o…
Sent from the XWiki- Users mailing list archive at
Nabble.com.