All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ml-modules.root.data-hub.third-party.fast-xml-parser.src.xmlNode.js Maven / Gradle / Ivy

There is a newer version: 6.1.1
Show newest version
'use strict';

module.exports = function(tagname, parent, val) {
  this.tagname = tagname;
  this.parent = parent;
  this.child = {}; //child tags
  this.attrsMap = {}; //attributes map
  this.val = val; //text only
  this.addChild = function(child) {
    if (Array.isArray(this.child[child.tagname])) {
      //already presents
      this.child[child.tagname].push(child);
    } else {
      this.child[child.tagname] = [child];
    }
  };
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy