Module: Polytexnic::Preprocessor::Html
- Included in:
- Polytexnic::Preprocessor
- Defined in:
- lib/polytexnic/preprocessors/html.rb
Instance Method Summary collapse
-
#to_xml ⇒ Object
Converts HTML to XML.
Instance Method Details
#to_xml ⇒ Object
Converts HTML to XML. The heart of the process is using Tralics to convert the input PolyTeX to XML. The raw PolyTeX needs to be processed first to make everything go smoothly, but after that the steps to producing the corresponding XML is straightforward.
11 12 13 14 15 16 17 |
# File 'lib/polytexnic/preprocessors/html.rb', line 11 def to_xml polytex = process_for_tralics(@polytex) puts "after processing for Tralics:\n#{polytex}" if debug? doc = Nokogiri::XML(tralics_xml(polytex)) add_document_tag(doc) @xml = doc.to_xml end |