2018-02-02 01:56:08 +00:00
|
|
|
import { BaseXmlComponent, IXmlableObject } from "file/xml-components";
|
2016-03-28 00:53:24 +01:00
|
|
|
|
|
|
|
export class Formatter {
|
2017-07-08 20:45:19 +01:00
|
|
|
public format(input: BaseXmlComponent): IXmlableObject {
|
2018-09-20 00:41:57 +01:00
|
|
|
const output = input.prepForXml();
|
|
|
|
|
|
|
|
if (output) {
|
|
|
|
return output;
|
|
|
|
} else {
|
|
|
|
throw Error("XMLComponent did not format correctly");
|
|
|
|
}
|
2016-03-28 00:53:24 +01:00
|
|
|
}
|
2017-03-09 20:49:14 +01:00
|
|
|
}
|