public class UnknownElementWriter implements IExtensionAttributeWriter, IExtensionElementWriter {
public void writeAttributes(final ITreeWriter writer, final Object userObject, final IExtension extension) {
final UnknownElements elements = (UnknownElements) extension;
final XMLElement unknownElements = elements.getUnknownElements();
if (unknownElements != null) {
final Enumeration<String> unknownAttributes = unknownElements.enumerateAttributeNames();
while (unknownAttributes.hasMoreElements()) {
final String name = unknownAttributes.nextElement();
final String value = unknownElements.getAttribute(name, null);
writer.addAttribute(name, value);
}