marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
AppCategories appCategories = new AppCategories();
appCategories.setFixed(true);
appCategories.setScheme("http://example.com/cats/big3");
Category category1 = new Category();
category1.setTerm("animal");
appCategories.getCategory().add(category1);
Category category2 = new Category();
category2.setTerm("vegetable");
appCategories.getCategory().add(category2);
Category category3 = new Category();
category3.setTerm("mineral");
appCategories.getCategory().add(category3);
StringWriter writer = new StringWriter();
JAXBElement<AppCategories> element = new JAXBElement<AppCategories>(new QName("","app:categories","app"),AppCategories.class,appCategories);