philcali / lmxml

XML is dead... Long live XML!

Version Matrix


The Light Markup to XML is a markup intended to make writing xml or a recursive decent markup, easier. Head over to the wiki for an in-depth tour of what can be expected from this library.

Interested in the command-line app?

Let's take a simple html document for example.


    <script type="text/javascript" src="blah.js"></script>
    <link rel="stylesheet" type="text/css" href="main.css"/>
    <div class="page">
      <div class="content">
        Blah Blah Blah
      <div id="footer">
        This is where the copyright goes.

Equivalent LMXML

    title "Test"
    script @type="text/javascript" @src="blah.js"
    link @rel="stylesheet" @type="text/css" @href="main.css"
    div .page
      div .content "Blah Blah Blah"
      div #footer "This is where the copyright goes."

The syntax

  1. Indention is important
  2. JSON-style attributes
  3. Class attributes prefixed with "." and Id with "#"
  4. Markdown Indirect link style templates
  5. Indirect definitions are delimited from main document by ---


div #page
  div .content
    div #footer

  div .signoff
    q "And this here is the good life."
    div .author "Philip Cali

Using The Library

Add it to your sbt build:

libraryDependencies += "com.github.philcali" %% "lmxml-core" % "0.1.3"


Each LMXML process (parsing, converting, transforming, etc), is designed to be extensible. Here's a list of each submodule and a link to each description:

That's all for now.

Learn by Example

I have included an example app that uses all listed submodules (except lmxml-json).

To run, simply:

git clone git://
cd lmxml
sbt "project lmxml-example" run

Try it out at http://localhost:8080.

Try it on AppEngine!

You've got nothing to lose, really. Head on over the GAE try LMXML app, to try the thing out. Give you hands a break from writing all those closing tags.