neman / neman / xml / examples / xml1.clj

Full commit
;; Copyright (c) 2008 Krešimir Šojat. All rights reserved.  The use and
;; distribution terms for this software are covered by the Common
;; Public License 1.0 (
;; which can be found in the file CPL.TXT at the root of this
;; distribution.  By using this software in any fashion, you are
;; agreeing to be bound by the terms of this license.  You must not
;; remove this notice, or any other, from this software.

(ns user
  (:require net.ksojat.neman.xml)
  (:use net.ksojat.neman.core [net.ksojat.neman.xml :only [xml]])
  (:import (org.jdom.output XMLOutputter)))

(def html-doc
    (=> :html
      [(=> :head)
       (=> :body
         {:class "klass" :id "main"}
         [(=> :p "Just some text.")])])))

(.output (XMLOutputter.) html-doc System/out)