return writeObjectToElement(type, bean, getContext());
}
protected Element writeObjectToElement(AegisType type, Object bean, Context context) {
Element element = createElement("urn:Bean", "root", "b");
ElementWriter writer = getElementWriter(element, new MapNamespaceContext());
type.writeObject(bean, writer, getContext());
writer.close();
return element;
}