org.apache.camel.dataformat.xmljson
Class XmlJsonDataFormat.NamespacesPerElementMapping

java.lang.Object
  extended by org.apache.camel.dataformat.xmljson.XmlJsonDataFormat.NamespacesPerElementMapping
Enclosing class:
XmlJsonDataFormat

public static class XmlJsonDataFormat.NamespacesPerElementMapping
extends Object

Encapsulates the information needed to bind namespace declarations to XML elements when performing JSON to XML conversions Given the following JSON: { "root:": { "element": "value", "element2": "value2" }}, it will produce the following XML when "element" is bound to prefix "ns1" and namespace URI "http://mynamespace.org": valuevalue2 For convenience, the NamespacesPerElementMapping#NamespacesPerElementMapping(String, String) constructor allows to specify multiple prefix-namespaceURI pairs in just one String line, the format being: |ns1|http://mynamespace.org|ns2|http://mynamespace2.org|


Field Summary
 String element
           
 Map<String,String> namespaces
           
 
Constructor Summary
XmlJsonDataFormat.NamespacesPerElementMapping(String element, Map<String,String> namespaces)
           
XmlJsonDataFormat.NamespacesPerElementMapping(String element, String pipeSeparatedMappings)
           
XmlJsonDataFormat.NamespacesPerElementMapping(String element, String prefix, String uri)
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

public String element

namespaces

public Map<String,String> namespaces
Constructor Detail

XmlJsonDataFormat.NamespacesPerElementMapping

public XmlJsonDataFormat.NamespacesPerElementMapping(String element,
                                                     Map<String,String> namespaces)

XmlJsonDataFormat.NamespacesPerElementMapping

public XmlJsonDataFormat.NamespacesPerElementMapping(String element,
                                                     String prefix,
                                                     String uri)

XmlJsonDataFormat.NamespacesPerElementMapping

public XmlJsonDataFormat.NamespacesPerElementMapping(String element,
                                                     String pipeSeparatedMappings)


Apache Camel