From 3691d79a4ac66f3dc562b507163e0690e5cf8326 Mon Sep 17 00:00:00 2001 From: Igor Bulovski Date: Mon, 23 Apr 2018 11:49:57 +0200 Subject: [PATCH] add method to add child to an element --- src/file/xml-components/xml-component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/file/xml-components/xml-component.ts b/src/file/xml-components/xml-component.ts index d3705478cb..833e368f23 100644 --- a/src/file/xml-components/xml-component.ts +++ b/src/file/xml-components/xml-component.ts @@ -23,4 +23,8 @@ export abstract class XmlComponent extends BaseXmlComponent { [this.rootKey]: children, }; } + + public addChildElement(child: XmlComponent | string) { + this.root.push(child); + } }