            XStream xStream = new XStream(new DomDriver());
                xStream.registerConverter(new PersonConverter());
                xStream.alias(&quot;person&quot;, Person.class);
                System.out.println(xStream.toXML(person));
        }

}</pre></div><p>Did you notice how we registered our converter? It's a simple
call to
<i>registerConverter</i>:</p><div class="Source Java"><pre>xStream.registerConverter(new PersonConverter());</pre></div><p>The
final result
is:</p><div class="Source