(note: inspired by http://stackoverflow.com/questions/21086717/how-to-convert-pojo-to-xml-with-jackson)
It would make sense to be able to indicate that a specific XML Schema instance would be output as, say:
<TestUser xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="testUser.xsd">
or
<TestUser xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="testUserNoNs.xsd">
This should be done using new (in 3.2) XmlGeneratorInitializer, allowing arbitrary Attributes to be added to the root element, including XMLSchema-instance ones (but not just those): specifying:
- Attribute name as
QName
- Attribute value as String
plus allowing String convenience overload for name (so 2 methods).
Attribute name/value combination to be stored as new RootAttribute value class which extends XmlGeneratorWritable.
(note: inspired by http://stackoverflow.com/questions/21086717/how-to-convert-pojo-to-xml-with-jackson)
It would make sense to be able to indicate that a specific XML Schema instance would be output as, say:
or
This should be done using new (in 3.2)
XmlGeneratorInitializer, allowing arbitrary Attributes to be added to the root element, including XMLSchema-instance ones (but not just those): specifying:QNameplus allowing
Stringconvenience overload for name (so 2 methods).Attribute name/value combination to be stored as new
RootAttributevalue class which extendsXmlGeneratorWritable.