[dokuwiki] Re: Help - write flat file to XML

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 29 Mar 2007 11:37:27 +0100

Hello,

Dokuwiki is most easily extended through plugins. The plugins page at splitbrain is your best place to see details and resources availble (http://wiki.splitbrain.org/wiki:plugins).

Your application seems best suited to a renderer plugin. Renderer plugins take DW instructions(1) and render them according to their code, e.g. a custom XML format. You can use the base renderer class (include/parser/renderer.php) or one of the existing renderer plugins as your foundation. These will have stubs for all of the native dokuwiki syntax modes. If your XML closely maps to DW native syntax, your coding will be a matter of generating appropriate strings for each DW instruction.

Cheers,

Chris

(1) DW parses the raw wiki text into an intermediate format, an instruction list. The instruction list is a programmatic representation of the raw wiki text.

a tahir wrote:
Very nice function..I Have tried that..it works well..
But that's not what i want/have on mind. I might have to explain what i wanted Doku to work on. I am using Doku (wiki features is what i am looking at in this study - i chose Doku) as an authoring tool for content (education) creation. The intended user for my study are teachers. As the content that they've created are stored in doku format (text file), i want to read it and stored in XML format (that i've created). Could anyone pls give me idea on how to do this?

If i wanted to change/extend any function in Doku, where should i do it? (am not sure about this)..i am new to coding..try to understand how doku is working and learning php at the same time..kind of hard to me..

Thank you very much.

*/Martin Tschofen <martin.tschofen@xxxxxxxxx>/* wrote:

    A quick search on export on the wiki explains it:

    http://wiki.splitbrain.org/wiki:export



    On 3/27/07, *a tahir* <mizabtet@xxxxxxxxx
    <mailto:mizabtet@xxxxxxxxx>> wrote:



        */Guy Brand <gb@xxxxxxxxxxxxxxxxx
        <mailto:gb@xxxxxxxxxxxxxxxxx>>/* wrote:

            On 27 March at 00:30, a tahir wrote:

            > I am new to DokuWiki and have successfully installed it
            on my local
            > machine. I am a student and using Doku to my research. I
            wanted to
            > ask if anyone knows how to read the doku file (flat file)
            and write
            > it as an XML (converting the flat file to xml). This can
            be done i
            > hope with doku.

            Hello,


            Yes it can. Use do=export_xhtml for the page you want to
            convert
            to xhtml.

-- bug -- DokuWiki mailing list - more info at
            http://wiki.splitbrain.org/wiki:mailinglist

        Hi,
        Thanks for the reply. Could you please elaborate how to do
        that? Does that means i don't have to write a code to read the
        text file and parse it to XML (save as XML)? and if i have to
        write a code how could i connect the code with doku?
        What i am having on mind now is to come out with a code that
        can read the text file and parse it as an XML. If there is a
        simple way to do this without coding as i am very poor in coding.
        ------------------------------------------------------------------------
        Sucker-punch spam with award-winning protection.
        Try the free Yahoo! Mail Beta.



------------------------------------------------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile <http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail> and always stay connected <http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail> to friends.

--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: