Hi,
docutils offers a rst2xml.py script, which writes out the internal
doctree as xml. When using this with Sphinx .rst files, it obviously
does not know about all the extra roles and directives and adds lots
of warnings/system-messages about those instead of nice xml nodes.
I managed to get it to work with simple Sphinx generated sources by
registering the basic nodes via adding a few imports:
# register all the sphinx nodes/roles/directives
from sphinx import addnodes, roles
from sphinx.directives import code, other
in the rst2xml.py script, but i did not find the proper way to register
:ref: or any of the domain specific things like :py:class: / .. py:class::.
Did anyone already hack something up that does it, or is my best bet to
extract the needed code from sphinx/application.py?
Michael
--
Michael Schlenker
Software Architect
CONTACT Software GmbH Tel.:
+49 (421) 20153-80
Wiener Straï¿œe 1-3 Fax:
+49 (421) 20153-41
28359 Bremen
http://www.contact.de/ E-Mail:
m...@contact.de
Sitz der Gesellschaft: Bremen
Geschï¿œftsfï¿œhrer: Karl Heinz Zachries, Ralf Holtgrefe
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215