343.4.
{ "pref1:a": "value1", "pref2:b": "value2" }
XmlJsonDataFormat namespacesFormat = new XmlJsonDataFormat();
List<XmlJsonDataFormat.NamespacesPerElementMapping> namespaces = new ArrayList<XmlJsonDataFormat.NamespacesPerElementMapping>();
namespaces.add(new XmlJsonDataFormat.
NamespacesPerElementMapping("", "|ns1|http://camel.apache.org/test1||http://camel.apache.org/default|"));
namespaces.add(new XmlJsonDataFormat.
NamespacesPerElementMapping("surname", "|ns2|http://camel.apache.org/personalData|" +
"ns3|http://camel.apache.org/personalData2|"));
namespacesFormat.setNamespaceMappings(namespaces);
namespacesFormat.setRootElement("person");
343.4.1. リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
{ "name": "Raul", "surname": "Kripalani", "f": true, "g": null}
<person xmlns="http://camel.apache.org/default" xmlns:ns1="http://camel.apache.org/test1">
<f>true</f>
<g null="true"/>
<name>Raul</name>
<surname xmlns:ns2="http://camel.apache.org/personalData" xmlns:ns3="http://camel.apache.org/personalData2">Kripalani</surname>
</person>