class XMLSplitterSerialisationHelper {

	public static Element typeDescriptorToExtensionXML(TypeDescriptor descriptor) {
		Element result = new Element("extensions", XScuflNS);
		Element type = null;
		if (descriptor instanceof ComplexTypeDescriptor) {
			type = constructElementForComplexType(
					(ComplexTypeDescriptor) descriptor, new ArrayList<String>());
		}
		else if (descriptor instanceof ArrayTypeDescriptor) {
			type = constructElementForArrayType(
					(ArrayTypeDescriptor) descriptor, new ArrayList<String>());
		}
		result.addContent(type);
		return result;
	}

}