org.apache.camel.dataformat.xmljson
Class XmlJsonDataFormat.NamespacesPerElementMapping
java.lang.Object
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|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
element
public String element
namespaces
public Map<String,String> namespaces
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