()
| 100 | } |
| 101 | |
| 102 | closeNode() { |
| 103 | const node = this._stack.pop(); |
| 104 | const xml = this._xml; |
| 105 | if (this.leaf) { |
| 106 | xml.push(CLOSE_SLASH_ANGLE); |
| 107 | } else { |
| 108 | xml.push(OPEN_ANGLE_SLASH); |
| 109 | xml.push(node); |
| 110 | xml.push(CLOSE_ANGLE); |
| 111 | } |
| 112 | this.open = false; |
| 113 | this.leaf = false; |
| 114 | } |
| 115 | |
| 116 | leafNode(name, attributes, text) { |
| 117 | this.openNode(name, attributes); |