Skip to content

koara/koara-rb-xml

Repository files navigation

Koara

Build Status Coverage Status Gem License

Koara-rb-xml

Koara is a modular lightweight markup language. This project can render the koara AST to Xml in Ruby. The AST is created by the core koara parser.

Getting started

  • Gem

    gem install koara-xml

Usage

require 'koara'
require 'koara/xml'

parser = Koara::Parser.new
result = parser.parse('Hello World!')
renderer = Koara::Xml::XmlRenderer.new
result.accept(renderer)
puts renderer.output

Configuration

You can configure the Renderer:

  • renderer.declaration_tag(declaration_tag) Default: null

    Add an XML Declaration Tag add the top of the generated output.