0

I know Datamapper can easily convert an XML structure to a map easily. But what is the best way to do this in Community edition? Note I want Maps rather than a concrete class sung Jaxb.

The json-to-object-transformer allows you to easily convert to a map but is there anything similar for XML?

jon lee
  • 887
  • 1
  • 15
  • 32

1 Answers1

0

As of now Mule Community Edition doesn't provide any out of the box solution for this.

You can always crate a Custom transformer and use some API like XStream to convert the XML to map.

Following Stackoverflow post give you a sample of how to use XStream API. How to convert XML to java.util.Map and vice versa

Hope this helps.

Community
  • 1
  • 1
user1760178
  • 6,277
  • 5
  • 27
  • 57