* The XMLizable object will be a standalone blurb of SAX events, not producing
* start/endDocument calls and containing all necessary namespace declarations.
*/
public static XMLizable compileElementContent(Element element) {
SaxBuffer saxBuffer = new SaxBuffer();
DOMStreamer domStreamer = new DOMStreamer();
domStreamer.setContentHandler(saxBuffer);
NodeList childNodes = element.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
try {
domStreamer.stream(childNodes.item(i));
} catch (SAXException e) {
// It's unlikely that an exception will occur here, so use a runtime exception
throw new RuntimeException("Error in DomHelper.compileElementContent: " + e.toString());
}
}