Constructs a new codec for the specified template object. The variables in the optional exclude array are ignored by the codec. Variables in the optional idrefs array are turned into references in the XML. The optional mapping may be used to map from variable names to XML attributes.
|template||Prototypical instance of the object to be encoded/decoded.|
|exclude||Optional array of fieldnames to be ignored.|
|idrefs||Optional array of fieldnames to be converted to/from references.|
|mapping||Optional mapping from field- to attributenames.|