XML mode, note & citation entities

XML mode supported.
Better handling of RDF/XML mode.
Note & Citation now save and reload properly.