Skip to content

A static builder project based on Cédric Champeau's staticbuilder project using groovy.util.Node

Notifications You must be signed in to change notification settings

xetus-oss/static-node-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

static-node-builder

A simple project based on Cedric Champeau's staticbuilder project intended to fill the gap in XML parsing / generation where requirements are imposed that mean a schema is too strict (as is required in jaxb and other XML libraries).

An example usage is:

MyBuilder extends ConstrainedNodeBuilder {
	schema = {
		html {
			body {
				a()
				p()
			}
     	}
   	}
}

Which would allow consumers to build node trees using the following format:

MyBuilder builder = new MyBuilder()
	builder.html {
		body {
    		p("This is some text in the paragraph")
    		a([href: "http://www.link.com", data: "these are attributes"], "LINK")
		}
	}
}

About

A static builder project based on Cédric Champeau's staticbuilder project using groovy.util.Node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published