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: p6.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 = p6.resource.get("ORDERS")
p6.idoc.loadDefinition(definition, false)
def xmlIdoc = p6.idoc.flatToXml(p6.resource.get("FlatOrder"))
println xmlIdoc
def flatIdoc = p6.idoc.xmlToFlat(xmlIdoc)
println flatIdoc
p6.idoc.loadDefinition(p6.resource.get("COMPILEDORDERS"), true)