373.4. Spring 또는 블루프린트 DSL로 기본 사용
< ;dataFormats& gt; 블록 내에서 고유한 ID로 xmljson 요소를 구성하면 됩니다.
<dataFormats>
<xmljson id="xmljson"/>
<xmljson id="xmljsonWithOptions" forceTopLevelObject="true" trimSpaces="true" rootName="newRoot" skipNamespaces="true"
removeNamespacePrefixes="true" expandableProperties="d e"/>
</dataFormats>
그런 다음 <marshal /> 및 < un > DSLs 내의 데이터 형식 오브젝트를 간단히 참조할 수 있습니다.
marshal /
<route>
<from uri="direct:marshal"/>
<marshal ref="xmljson"/>
<to uri="mock:json" />
</route>
<route>
<from uri="direct:unmarshalWithOptions"/>
<unmarshal ref="xmljsonWithOptions"/>
<to uri="mock:xmlWithOptions"/>
</route>
이 구성 요소에 대해 XML DSL 자동 완성을 활성화하는 것은 쉽습니다. Spring 또는 블루프린트 DSL을 사용하는지 여부에 따라 적절한 스키마 위치를 참조하십시오. 이 데이터 형식은 Camel 2.10 이상에서 사용할 수 있으므로 해당 버전의 스키마만 이러한 새로운 XML 요소와 속성을 포함합니다.
블루프린트의 구문은 Spring DSL의 구문과 동일합니다. 올바른 네임스페이스 및 schemaLocation이 사용 중인지 확인합니다.