XmlBuilder trait: Takes as input XMLEvent and produces XmlBuilder.
XmlBuilder trait: Takes as input XMLEvent and produces XmlBuilder. There are two states that .process can lead to: BuildingElement(currentElement: Elem, ancestors: Elem*) FinalNode(elem: Elem)
By passing in an event to BuildingElement you will get a new BuildingElement back We only expose FinalElement for you though. When you reach a FinalElement, Capture the output - this will be the fully formed tree. Then you can start the process all over again.
Build 'Elem' out of 'XMLEvent'. See tests for examples.