Text::Restructured::Writer::LibXML
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);
This module implements a "Writer" for Text::Restructured, that instead of returning a string, returns a XML::LibXML DOM.
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.
new
Returns a new object.
= ProcessDOM(
)
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.
To install Text::Restructured::Writer::LibXML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Restructured::Writer::LibXML
CPAN shell
perl -MCPAN -e shell install Text::Restructured::Writer::LibXML
For more information on module installation, please visit the detailed CPAN module installation guide.