public static XMLizable compileElementContent(Element element) {
// Remove location information
LocationAttributes.remove(element, true);
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());