MCPcopy Create free account
hub / github.com/NaturalIntelligence/fast-xml-parser / constructor

Method constructor

src/xmlparser/xmlNode.js:12–16  ·  view source on GitHub ↗
(tagname)

Source from the content-addressed store, hash-verified

10
11export default class XmlNode {
12 constructor(tagname) {
13 this.tagname = tagname;
14 this.child = []; //nested tags, text, cdata, comments in order
15 this[":@"] = Object.create(null); //attributes map
16 }
17 add(key, val) {
18 // this.child.push( {name : key, val: val, isCdata: isCdata });
19 if (key === "__proto__") key = "#__proto__";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected