[xwiki-devs] Import XML+HTML structure in XWIKI
Good morning, In my company we are using an XML structure which is a Tree on screen which points on Html files that are the datas. The XML tree has multiple levels and i would like to know how i could import this structure in xwiki to make it editable more easily. Xwiki is installed on Tomcat with an Oracle DB. I tried to find out how Xwiki communicate with the DB and also installed Xeclipse but i dont have much time and that's why i need your help to locate important files that i have to use to do it. Regards, Jérémy GIAIME Trace Solutions
Hi, Are you trying to make both the tree structure editable and the HTML where the datas are ? I suggest you create a simple class Tree.TreeItemClass name TextClass parent DBListClass pointing to elements of the same class uri TextClass or html TextAreaClass other properties if needed You can then write a Sheet allowing to edit pages with the tree structure. A script can be created to generate your current XML structure from the xwiki content. Another script can be created to read your current xml structure the first time to create the xwiki pages. Ludovic [email protected] wrote:
Good morning,
In my company we are using an XML structure which is a Tree on screen which points on Html files that are the datas.
The XML tree has multiple levels and i would like to know how i could import this structure in xwiki to make it editable more easily.
Xwiki is installed on Tomcat with an Oracle DB.
I tried to find out how Xwiki communicate with the DB and also installed Xeclipse but i dont have much time and that's why i need your help to locate important files that i have to use to do it.
Regards,
Jérémy GIAIME Trace Solutions _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
Thank you for your answer Ludovic, Actually i try to move datas from RoboHelp to xwiki, i saw its possible to mediawiki but we already have datas on Xwiki. Anyways, I don't need to edit the tree, only datas that are on html. The big problem is i dont know a lot about JAVA, usually only use PHP. I know this mailinglist is for Java master, but i really need help :) I dont even know where i can change things in Xwiki to make it deal with my datas, im lost in the framework. So if you could give me more details i think i will be able to make it. Thx people.
Hi,
Are you trying to make both the tree structure editable and the HTML where the datas are ?
I suggest you create a simple class
Tree.TreeItemClass name TextClass parent DBListClass pointing to elements of the same class uri TextClass or html TextAreaClass other properties if needed
You can then write a Sheet allowing to edit pages with the tree structure. A script can be created to generate your current XML structure from the xwiki content.
Another script can be created to read your current xml structure the first time to create the xwiki pages.
Ludovic
[email protected] wrote:
Good morning,
In my company we are using an XML structure which is a Tree on screen which points on Html files that are the datas.
The XML tree has multiple levels and i would like to know how i could import this structure in xwiki to make it editable more easily.
Xwiki is installed on Tomcat with an Oracle DB.
I tried to find out how Xwiki communicate with the DB and also installed Xeclipse but i dont have much time and that's why i need your help to locate important files that i have to use to do it.
Regards,
Jérémy GIAIME Trace Solutions _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
If you have an XML file with a list of HTML files referenced then you can use: - Use simple java file reading on groovy to read your content from disk or use xwiki.getURLContent() to read data from the web - Groovy to read your XML file (see Groovy XML API and xwiki.org to find out how to use groovy in xwiki) - Use the xwiki api to create new documents and put your HTML in the Wiki documents. In groovy for example: <% loop in your xml file { content = xwiki.getURLContent(url) // this will protect your html from wiki syntax content = "{" + "pre" + "}" + content +"{" + "/pre" + "}" title = "some page title from xml" // find page name from data in your xml pagename = "Help.Page1" newdoc = xwiki.getDocument(pagename) newdoc.setContent(content) newdoc.setTitle(title) newdoc.save() } %> Now your HTML won't be converted to XWiki syntax. In the next version of XWiki there will be code to transform HTML to wiki syntax. You will need to perform some modification to your content to create wiki links instead of <a href=""> etc.. Ludovic [email protected] wrote:
Thank you for your answer Ludovic,
Actually i try to move datas from RoboHelp to xwiki, i saw its possible to mediawiki but we already have datas on Xwiki. Anyways, I don't need to edit the tree, only datas that are on html. The big problem is i dont know a lot about JAVA, usually only use PHP. I know this mailinglist is for Java master, but i really need help :) I dont even know where i can change things in Xwiki to make it deal with my datas, im lost in the framework.
So if you could give me more details i think i will be able to make it.
Thx people.
Hi,
Are you trying to make both the tree structure editable and the HTML where the datas are ?
I suggest you create a simple class
Tree.TreeItemClass name TextClass parent DBListClass pointing to elements of the same class uri TextClass or html TextAreaClass other properties if needed
You can then write a Sheet allowing to edit pages with the tree structure. A script can be created to generate your current XML structure from the xwiki content.
Another script can be created to read your current xml structure the first time to create the xwiki pages.
Ludovic
[email protected] wrote:
Good morning,
In my company we are using an XML structure which is a Tree on screen which points on Html files that are the datas.
The XML tree has multiple levels and i would like to know how i could
import
this structure in xwiki to make it editable more easily.
Xwiki is installed on Tomcat with an Oracle DB.
I tried to find out how Xwiki communicate with the DB and also installed Xeclipse but i dont have much time and that's why i need your help to
locate
important files that i have to use to do it.
Regards,
Jérémy GIAIME Trace Solutions _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
participants (2)
-
gerem44@free.fr -
Ludovic Dubost