General Principle of the DOM Tree

DOM Tree is not format. It means that we cannot find a flat file with the DOM Tree. It is only an ínternal representation of the data using a tree. Then the Tree can be stored in a database, in a flat file ...

This tree is a collection of item with hierarchical representation. An item can be itself a subtree.

Then to create a document, the principle is pretty simple, we parse the document and construct our tree using such function addNode(), addSiblings() ... And to display a document, we can just browse the tree and convert any item into correct code for the format we choose.

DOM Tree and MoinMoin

In Moin2.0 you are not creating page, but item, then a page is just an item itself including other items.

Main Components to deal with a DOM Tree in MoinMoin

EmeraldTree

EmeraldTree il a fork from ElementTree. It is used to handle our Tree. So in our case, an Element is an item of our Tree.

MoinMoin.Converter2

Converter2 are the set of converter form and to the DOM Tree

MoinMoin.util.tree

This class is used to handle the NameSpace. However that's not so clear what is a namespace exactly.

MoinMoin.util.mime

This class handle the different mimetype for our object in the tree.

Quick Reminder about the converter

Check BastianBlank/TreeOutputFormatter/Documentation for more information. But here are some key point you have to remember when you start a to write a converter.

Question

LinkFarm

MoinMoin: DOM DocBook and HTML 2010/AboutDOMTree (last edited 2010-05-09 11:15:02 by ValentinJaniaut)