IDoc
Purpose¶
Transforms a flat IDoc into XML IDoc or vice-versa. The DSL requires a parser definition file for the converted IDoc.
Methods¶
Binding name: idoc
Method: void loadDefinition(String idocDef, boolean isCompiledXml)
Load the IDoc definition given as a String. The String can in a pre-compiled XML format or will be compiled and loaded.
Method: String exportDefinitionAsXml()
Exports a previously loaded IDoc definition in compiled XML format.
Method: String flatToXml(String flatIDOC)
Transform a flat IDoc to XML IDoc.
Method: String xmlToFlat(String xmlIDOC)
Transform an XML IOC to flat IDoc.
Examples¶
def definition = resource.get("ORDERS") idoc.loadDefinition(definition, false) def xmlIdoc = idoc.flatToXml(resource.get("FlatOrder")) println xmlIdoc def flatIdoc = idoc.xmlToFlat(xmlIdoc) println flatIdoc idoc.loadDefinition(resource.get("COMPILEDORDERS"), true)