Skip to content

philcali/lmxml

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LMXML

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.

HTML

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

Equivalent LMXML

html
  head
    title "Test"
    script @type="text/javascript" @src="blah.js"
    link @rel="stylesheet" @type="text/css" @href="main.css"
  body
    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 ---

Example:

div #page
  [boilerplate]
  div .content
    div #footer
      [boilerplate]

[boilerplate]:
  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"

Plugins!

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://github.com/philcali/lmxml.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.

License

MIT

About

XML is dead... Long live XML!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages