use Text::Restructured; use Text::Restructured::Writer::LibXML; my $parser=Text::Restructured->new($opts,'gino'); my $dudom=$parser->Parse($input,$filename); my $xdoc=Text::Restructured::Writer::LibXML->new->ProcessDOM($dudom);
The DOM will have non-namespaced elements according to the docutils vocabulary, and namespcaed elements according to the MathML vocabulary.
This is probably the fastest way to transform a Text::Restructured::DOM structure into a proper XML DOM.
Returns a new object.
Given an object of type Text::Restructured::DOM, processes it recursively and builds an XML DOM into a new document. Returns the document, or dies trying.