def categoryXML(category_id): """ ####Args#### + category_id: the id of the category of the book ####Returns#### + genre: XML object of the genre """ category = session.query(Category).filter_by(id=category_id).one() root = ET.Element('genre') return app.response_class( ET.tostring( Category.getCategoryXML(session, category.id, root), encoding='us-ascii', method='xml'), mimetype='application/xml')