Browse Source

fix xml structure

Martin Kunz 1 year ago
parent
commit
9d4ecf9dab
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/ua/UANodeSet.ts

+ 4 - 4
src/ua/UANodeSet.ts

@@ -31,15 +31,15 @@ export class UANodeSet implements IToXML{
     }
 
     toXML(): XMLElem {
-        const elem =new XMLElem('UANodeSet');
-        const xmlModels=elem.add(new XMLElem('Models'));
+        const xmlUANodeSet =new XMLElem('UANodeSet');
+        const xmlModels=xmlUANodeSet.add(new XMLElem('Models'));
         for(const model of this.models) {
             xmlModels.add(model.toXML())
         }
         for(const node of this.nodes) {
-            xmlModels.add(node.toXML())
+            xmlUANodeSet.add(node.toXML())
         }
-        return elem;
+        return xmlUANodeSet;
     }
 
     static async load(url: string) {