writer.getXMLIntrospector().register(new InputSource(getClass().getResourceAsStream("/mapping.xml")));
writer.getXMLIntrospector().register(getBetwixtMapping());
    protected BeanWriter getWriter(Writer output) throws IntrospectionException, SAXException, IOException    {        BeanWriter writer = new BeanWriter(output);        writer.getXMLIntrospector().register(new InputSource(getClass().getResourceAsStream("/mapping.xml")));        writer.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(true);        writer.getXMLIntrospector().getConfiguration().setWrapCollectionsInElement(false);        writer.getXMLIntrospector().getConfiguration().setElementNameMapper(new HyphenatedNameMapper());        writer.getBindingConfiguration().setMapIDs(false);        writer.enablePrettyPrint();        return writer;    }