chris-twiner / scalesXml

Alternate Scala XML library
77 stars 16 forks source link

Optional trees in DSL #18

Closed chris-twiner closed 11 years ago

chris-twiner commented 11 years ago

Currently the optional xml focusses on text and children items, a cascading approach is also needed, such that

root /( fred ?~> None )

will generate

<root/> 

only, not additionally

<root><fred/></root> 

as currently with the optional text child. This should cascade throughout the tree so that, if there are no children below there should be a None returned for the ItemOrElem.