I have an object `value`, which is of some type, either `@XmlRootElement`-annotated, or not. I want to marshal it into XML:

```
String value1 = "test";
assertEquals("<foo>test</foo>", toXml("foo", value1));
// ...
@XmlRootElement
class Bar {
  public String bar = "test";
}
assertEquals("<foo><bar>test</bar></foo>", toXml("foo", new Bar()));

```

Can I do it with JAXB existing facilities, or I should create some custom analyzer?