 			do {
 				let xmlDoc = try AEXMLDocument(xmlData: xmlData, processNamespaces: true)
 				if let parsedElement = <%= FULL_NAME_CAMEL %>.parseElement(xmlDoc.root) {
-					xmlCache.setObject(parsedElement as! AnyObject, forKey:string)
+					xmlCache.setObject(parsedElement, forKey:string)
 					let copiedElement = parsedElement.copy()
 					if prepare {
 						copiedElement.visit() { $0.gaxbPrepare() }


				if(appinfo == "ENUM" or appinfo == "NAMED_ENUM") then
					for k,v in pairs(enums) do
						gaxb_print("\t\tcase "..v.attributes.value.." = \""..v.attributes.value.."\"\n")
					end
				end
		--		if(appinfo == "ENUM_MASK") then

	}

	public class func parseElement(element: AEXMLElement) -> GaxbElement? {
		guard let entity = GaxbFactory.element(namespaceForElement(element), name:element.name) else { return nil }
		for (attribute, value) in element.attributes {
			if let valueString = value as? String, attributeString = attribute as? String {
				entity.setAttribute(valueString, key: attributeString)
			}
		}
		for child in element.children {
			if let subEntity = <%= FULL_NAME_CAMEL %>.parseElement(child) {
				entity.setElement(subEntity, key: child.name)
			}
		}
		return entity
	}

<%
