Browse Source

xml parse/export Alias, uanodeset attrs

Martin Kunz 9 months ago
parent
commit
41b89e1c4d
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/ua/UAAlias.ts

+ 12 - 0
src/ua/UAAlias.ts

@@ -0,0 +1,12 @@
+import { XMLElem, type IToXML } from "@/util/XmlElem";
+export class UAAlias implements IToXML{
+    constructor(public alias: string,
+                public id: string) {
+    }
+    toXML(): XMLElem {
+        return new XMLElem('Alias', this.id).attr('alias', this.alias);  
+    }
+    static fromXML(xmlObject: any): UAAlias {
+        return new UAAlias( xmlObject['@_Alias'], xmlObject['#text']);
+    }
+}