@xmldom/xmldom 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/lib/conventions.js +26 -0
- package/lib/dom.js +4 -3
- package/package.json +5 -5
- package/readme.md +183 -166
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.8.2](https://github.com/xmldom/xmldom/compare/0.8.1...0.8.2)
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- fix(dom): Serialize `>` as specified (#395) [`#58`](https://github.com/xmldom/xmldom/issues/58)
|
|
11
|
+
|
|
12
|
+
### Other
|
|
13
|
+
- docs: Add `nodeType` values to public interface description [`#396`](https://github.com/xmldom/xmldom/pull/396)
|
|
14
|
+
- test: Add executable examples for node and typescript [`#317`](https://github.com/xmldom/xmldom/pull/317)
|
|
15
|
+
- fix(dom): Serialize `>` as specified [`#395`](https://github.com/xmldom/xmldom/pull/395)
|
|
16
|
+
- chore: Add minimal `Object.assign` ponyfill [`#379`](https://github.com/xmldom/xmldom/pull/379)
|
|
17
|
+
- docs: Refine release documentation [`#378`](https://github.com/xmldom/xmldom/pull/378)
|
|
18
|
+
- chore: update various dev dependencies
|
|
19
|
+
|
|
20
|
+
Thank you [@niklasl](https://github.com/niklasl), [@cburatto](https://github.com/cburatto), [@SheetJSDev](https://github.com/SheetJSDev), [@pyrsmk](https://github.com/pyrsmk) for your contributions
|
|
21
|
+
|
|
7
22
|
## [0.8.1](https://github.com/xmldom/xmldom/compare/0.8.0...0.8.1)
|
|
8
23
|
|
|
9
24
|
### Fixes
|
package/lib/conventions.js
CHANGED
|
@@ -22,6 +22,31 @@ function freeze(object, oc) {
|
|
|
22
22
|
return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Since we can not rely on `Object.assign` we provide a simplified version
|
|
27
|
+
* that is sufficient for our needs.
|
|
28
|
+
*
|
|
29
|
+
* @param {Object} target
|
|
30
|
+
* @param {Object | null | undefined} source
|
|
31
|
+
*
|
|
32
|
+
* @returns {Object} target
|
|
33
|
+
* @throws TypeError if target is not an object
|
|
34
|
+
*
|
|
35
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
|
|
36
|
+
* @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign
|
|
37
|
+
*/
|
|
38
|
+
function assign(target, source) {
|
|
39
|
+
if (target === null || typeof target !== 'object') {
|
|
40
|
+
throw new TypeError('target is not an object')
|
|
41
|
+
}
|
|
42
|
+
for (var key in source) {
|
|
43
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
44
|
+
target[key] = source[key]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return target
|
|
48
|
+
}
|
|
49
|
+
|
|
25
50
|
/**
|
|
26
51
|
* All mime types that are allowed as input to `DOMParser.parseFromString`
|
|
27
52
|
*
|
|
@@ -139,6 +164,7 @@ var NAMESPACE = freeze({
|
|
|
139
164
|
XMLNS: 'http://www.w3.org/2000/xmlns/',
|
|
140
165
|
})
|
|
141
166
|
|
|
167
|
+
exports.assign = assign;
|
|
142
168
|
exports.freeze = freeze;
|
|
143
169
|
exports.MIME_TYPE = MIME_TYPE;
|
|
144
170
|
exports.NAMESPACE = NAMESPACE;
|
package/lib/dom.js
CHANGED
|
@@ -1187,9 +1187,10 @@ function needNamespaceDefine(node, isHTML, visibleNamespaces) {
|
|
|
1187
1187
|
* are serialized as their entity references, so they will be preserved.
|
|
1188
1188
|
* (In contrast to whitespace literals in the input which are normalized to spaces)
|
|
1189
1189
|
* @see https://www.w3.org/TR/xml11/#AVNormalize
|
|
1190
|
+
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
|
|
1190
1191
|
*/
|
|
1191
1192
|
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
1192
|
-
buf.push(' ', qualifiedName, '="', value.replace(/[
|
|
1193
|
+
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"')
|
|
1193
1194
|
}
|
|
1194
1195
|
|
|
1195
1196
|
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
@@ -1334,10 +1335,10 @@ function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
|
1334
1335
|
* and does not include the CDATA-section-close delimiter, `]]>`.
|
|
1335
1336
|
*
|
|
1336
1337
|
* @see https://www.w3.org/TR/xml/#NT-CharData
|
|
1338
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
|
1337
1339
|
*/
|
|
1338
1340
|
return buf.push(node.data
|
|
1339
|
-
.replace(/[
|
|
1340
|
-
.replace(/]]>/g, ']]>')
|
|
1341
|
+
.replace(/[<&>]/g,_xmlEncoder)
|
|
1341
1342
|
);
|
|
1342
1343
|
case CDATA_SECTION_NODE:
|
|
1343
1344
|
return buf.push( '<![CDATA[',node.data,']]>');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmldom/xmldom",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"w3c",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@stryker-mutator/core": "5.6.1",
|
|
46
46
|
"auto-changelog": "2.4.0",
|
|
47
|
-
"eslint": "8.
|
|
48
|
-
"eslint-config-prettier": "8.
|
|
47
|
+
"eslint": "8.12.0",
|
|
48
|
+
"eslint-config-prettier": "8.5.0",
|
|
49
49
|
"eslint-plugin-es5": "1.5.0",
|
|
50
50
|
"eslint-plugin-prettier": "4.0.0",
|
|
51
51
|
"get-stream": "6.0.1",
|
|
52
52
|
"jest": "27.5.1",
|
|
53
53
|
"nodemon": "2.0.15",
|
|
54
|
-
"np": "7.6.
|
|
55
|
-
"prettier": "2.
|
|
54
|
+
"np": "7.6.1",
|
|
55
|
+
"prettier": "2.6.2",
|
|
56
56
|
"xmltest": "1.5.0",
|
|
57
57
|
"yauzl": "2.10.0"
|
|
58
58
|
},
|
package/readme.md
CHANGED
|
@@ -41,28 +41,23 @@ This project was forked from it's [original source](https://github.com/jindw/xml
|
|
|
41
41
|
|
|
42
42
|
### Example:
|
|
43
43
|
|
|
44
|
+
[In NodeJS](examples/nodejs/src/index.js)
|
|
44
45
|
```javascript
|
|
45
|
-
const { DOMParser } = require('@xmldom/xmldom')
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
)
|
|
55
|
-
doc.documentElement.setAttribute('x', 'y')
|
|
56
|
-
doc.documentElement.setAttributeNS('./lite', 'c:x', 'y2')
|
|
57
|
-
console.info(doc)
|
|
58
|
-
|
|
59
|
-
const nsAttr = doc.documentElement.getAttributeNS('./lite', 'x')
|
|
60
|
-
console.info(nsAttr)
|
|
46
|
+
const { DOMParser, XMLSerializer } = require('@xmldom/xmldom')
|
|
47
|
+
|
|
48
|
+
const source = `<xml xmlns="a">
|
|
49
|
+
<child>test</child>
|
|
50
|
+
<child/>
|
|
51
|
+
</xml>`
|
|
52
|
+
|
|
53
|
+
const doc = new DOMParser().parseFromString(source, 'text/xml')
|
|
54
|
+
|
|
55
|
+
const serialized = new XMLSerializer().serializeToString(doc)
|
|
61
56
|
```
|
|
62
57
|
|
|
63
|
-
Note: in Typescript and ES6 you can use the import approach, as follows:
|
|
58
|
+
Note: in Typescript ~and ES6~(see #316) you can use the `import` approach, as follows:
|
|
64
59
|
|
|
65
|
-
```
|
|
60
|
+
```typescript
|
|
66
61
|
import { DOMParser } from '@xmldom/xmldom'
|
|
67
62
|
```
|
|
68
63
|
|
|
@@ -103,182 +98,204 @@ import { DOMParser } from '@xmldom/xmldom'
|
|
|
103
98
|
```
|
|
104
99
|
### DOM level2 method and attribute:
|
|
105
100
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
101
|
+
* [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247)
|
|
102
|
+
|
|
103
|
+
readonly class properties (aka `NodeType`),
|
|
104
|
+
these can be accessed from any `Node` instance `node`:
|
|
105
|
+
`if (node.nodeType === node.ELEMENT_NODE) {...`
|
|
106
|
+
|
|
107
|
+
1. `ELEMENT_NODE` (`1`)
|
|
108
|
+
2. `ATTRIBUTE_NODE` (`2`)
|
|
109
|
+
3. `TEXT_NODE` (`3`)
|
|
110
|
+
4. `CDATA_SECTION_NODE` (`4`)
|
|
111
|
+
5. `ENTITY_REFERENCE_NODE` (`5`)
|
|
112
|
+
6. `ENTITY_NODE` (`6`)
|
|
113
|
+
7. `PROCESSING_INSTRUCTION_NODE` (`7`)
|
|
114
|
+
8. `COMMENT_NODE` (`8`)
|
|
115
|
+
9. `DOCUMENT_NODE` (`9`)
|
|
116
|
+
10. `DOCUMENT_TYPE_NODE` (`10`)
|
|
117
|
+
11. `DOCUMENT_FRAGMENT_NODE` (`11`)
|
|
118
|
+
12. `NOTATION_NODE` (`12`)
|
|
119
|
+
|
|
120
|
+
attribute:
|
|
121
|
+
- `nodeValue` | `prefix`
|
|
124
122
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
123
|
+
readonly attribute:
|
|
124
|
+
- `nodeName` | `nodeType` | `parentNode` | `childNodes` | `firstChild` | `lastChild` | `previousSibling` | `nextSibling` | `attributes` | `ownerDocument` | `namespaceURI` | `localName`
|
|
125
|
+
|
|
126
|
+
method:
|
|
127
|
+
* `insertBefore(newChild, refChild)`
|
|
128
|
+
* `replaceChild(newChild, oldChild)`
|
|
129
|
+
* `removeChild(oldChild)`
|
|
130
|
+
* `appendChild(newChild)`
|
|
131
|
+
* `hasChildNodes()`
|
|
132
|
+
* `cloneNode(deep)`
|
|
133
|
+
* `normalize()`
|
|
134
|
+
* `isSupported(feature, version)`
|
|
135
|
+
* `hasAttributes()`
|
|
136
|
+
* [DOMException](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html)
|
|
137
|
+
|
|
138
|
+
extends the Error type thrown as part of DOM API.
|
|
139
|
+
|
|
140
|
+
readonly class properties:
|
|
141
|
+
- `INDEX_SIZE_ERR` (`1`)
|
|
142
|
+
- `DOMSTRING_SIZE_ERR` (`2`)
|
|
143
|
+
- `HIERARCHY_REQUEST_ERR` (`3`)
|
|
144
|
+
- `WRONG_DOCUMENT_ERR` (`4`)
|
|
145
|
+
- `INVALID_CHARACTER_ERR` (`5`)
|
|
146
|
+
- `NO_DATA_ALLOWED_ERR` (`6`)
|
|
147
|
+
- `NO_MODIFICATION_ALLOWED_ERR` (`7`)
|
|
148
|
+
- `NOT_FOUND_ERR` (`8`)
|
|
149
|
+
- `NOT_SUPPORTED_ERR` (`9`)
|
|
150
|
+
- `INUSE_ATTRIBUTE_ERR` (`10`)
|
|
151
|
+
- `INVALID_STATE_ERR` (`11`)
|
|
152
|
+
- `SYNTAX_ERR` (`12`)
|
|
153
|
+
- `INVALID_MODIFICATION_ERR` (`13`)
|
|
154
|
+
- `NAMESPACE_ERR` (`14`)
|
|
155
|
+
- `INVALID_ACCESS_ERR` (`15`)
|
|
140
156
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
This property is of type Number.
|
|
157
|
+
attributes:
|
|
158
|
+
- `code` with a value matching one of the above constants.
|
|
144
159
|
|
|
145
|
-
|
|
160
|
+
* [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)
|
|
146
161
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
createDocumentType(qualifiedName, publicId, systemId)
|
|
152
|
-
createDocument(namespaceURI, qualifiedName, doctype)
|
|
162
|
+
method:
|
|
163
|
+
- `hasFeature(feature, version)`
|
|
164
|
+
- `createDocumentType(qualifiedName, publicId, systemId)`
|
|
165
|
+
- `createDocument(namespaceURI, qualifiedName, doctype)`
|
|
153
166
|
|
|
154
|
-
|
|
167
|
+
* [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node
|
|
155
168
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
169
|
+
readonly attribute:
|
|
170
|
+
- `doctype` | `implementation` | `documentElement`
|
|
171
|
+
|
|
172
|
+
method:
|
|
173
|
+
- `createElement(tagName)`
|
|
174
|
+
- `createDocumentFragment()`
|
|
175
|
+
- `createTextNode(data)`
|
|
176
|
+
- `createComment(data)`
|
|
177
|
+
- `createCDATASection(data)`
|
|
178
|
+
- `createProcessingInstruction(target, data)`
|
|
179
|
+
- `createAttribute(name)`
|
|
180
|
+
- `createEntityReference(name)`
|
|
181
|
+
- `getElementsByTagName(tagname)`
|
|
182
|
+
- `importNode(importedNode, deep)`
|
|
183
|
+
- `createElementNS(namespaceURI, qualifiedName)`
|
|
184
|
+
- `createAttributeNS(namespaceURI, qualifiedName)`
|
|
185
|
+
- `getElementsByTagNameNS(namespaceURI, localName)`
|
|
186
|
+
- `getElementById(elementId)`
|
|
187
|
+
|
|
188
|
+
* [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node
|
|
189
|
+
* [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node
|
|
176
190
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
191
|
+
readonly attribute:
|
|
192
|
+
- `tagName`
|
|
193
|
+
|
|
194
|
+
method:
|
|
195
|
+
- `getAttribute(name)`
|
|
196
|
+
- `setAttribute(name, value)`
|
|
197
|
+
- `removeAttribute(name)`
|
|
198
|
+
- `getAttributeNode(name)`
|
|
199
|
+
- `setAttributeNode(newAttr)`
|
|
200
|
+
- `removeAttributeNode(oldAttr)`
|
|
201
|
+
- `getElementsByTagName(name)`
|
|
202
|
+
- `getAttributeNS(namespaceURI, localName)`
|
|
203
|
+
- `setAttributeNS(namespaceURI, qualifiedName, value)`
|
|
204
|
+
- `removeAttributeNS(namespaceURI, localName)`
|
|
205
|
+
- `getAttributeNodeNS(namespaceURI, localName)`
|
|
206
|
+
- `setAttributeNodeNS(newAttr)`
|
|
207
|
+
- `getElementsByTagNameNS(namespaceURI, localName)`
|
|
208
|
+
- `hasAttribute(name)`
|
|
209
|
+
- `hasAttributeNS(namespaceURI, localName)`
|
|
210
|
+
|
|
211
|
+
* [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node
|
|
212
|
+
|
|
213
|
+
attribute:
|
|
214
|
+
- `value`
|
|
215
|
+
|
|
216
|
+
readonly attribute:
|
|
217
|
+
- `name` | `specified` | `ownerElement`
|
|
218
|
+
|
|
219
|
+
* [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177)
|
|
204
220
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
221
|
+
readonly attribute:
|
|
222
|
+
- `length`
|
|
223
|
+
|
|
224
|
+
method:
|
|
225
|
+
- `item(index)`
|
|
209
226
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
227
|
+
* [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922)
|
|
228
|
+
|
|
229
|
+
readonly attribute:
|
|
230
|
+
- `length`
|
|
231
|
+
|
|
232
|
+
method:
|
|
233
|
+
- `getNamedItem(name)`
|
|
234
|
+
- `setNamedItem(arg)`
|
|
235
|
+
- `removeNamedItem(name)`
|
|
236
|
+
- `item(index)`
|
|
237
|
+
- `getNamedItemNS(namespaceURI, localName)`
|
|
238
|
+
- `setNamedItemNS(arg)`
|
|
239
|
+
- `removeNamedItemNS(namespaceURI, localName)`
|
|
222
240
|
|
|
223
|
-
|
|
241
|
+
* [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node
|
|
224
242
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
243
|
+
method:
|
|
244
|
+
- `substringData(offset, count)`
|
|
245
|
+
- `appendData(arg)`
|
|
246
|
+
- `insertData(offset, arg)`
|
|
247
|
+
- `deleteData(offset, count)`
|
|
248
|
+
- `replaceData(offset, count, arg)`
|
|
231
249
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
250
|
+
* [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData
|
|
251
|
+
|
|
252
|
+
method:
|
|
253
|
+
- `splitText(offset)`
|
|
236
254
|
|
|
237
|
-
|
|
238
|
-
|
|
255
|
+
* [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212)
|
|
256
|
+
* [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData
|
|
239
257
|
|
|
240
|
-
|
|
258
|
+
* [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927)
|
|
241
259
|
|
|
242
|
-
|
|
243
|
-
|
|
260
|
+
readonly attribute:
|
|
261
|
+
- `name` | `entities` | `notations` | `publicId` | `systemId` | `internalSubset`
|
|
244
262
|
|
|
245
|
-
|
|
263
|
+
* Notation : Node
|
|
246
264
|
|
|
247
|
-
|
|
248
|
-
|
|
265
|
+
readonly attribute:
|
|
266
|
+
- `publicId` | `systemId`
|
|
249
267
|
|
|
250
|
-
|
|
268
|
+
* Entity : Node
|
|
251
269
|
|
|
252
|
-
|
|
253
|
-
|
|
270
|
+
readonly attribute:
|
|
271
|
+
- `publicId` | `systemId` | `notationName`
|
|
254
272
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
273
|
+
* EntityReference : Node
|
|
274
|
+
* ProcessingInstruction : Node
|
|
275
|
+
|
|
276
|
+
attribute:
|
|
277
|
+
- `data`
|
|
278
|
+
readonly attribute:
|
|
279
|
+
- `target`
|
|
262
280
|
|
|
263
281
|
### DOM level 3 support:
|
|
264
282
|
|
|
265
|
-
|
|
283
|
+
* [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent)
|
|
266
284
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
285
|
+
attribute:
|
|
286
|
+
- `textContent`
|
|
287
|
+
|
|
288
|
+
method:
|
|
289
|
+
- `isDefaultNamespace(namespaceURI)`
|
|
290
|
+
- `lookupNamespaceURI(prefix)`
|
|
272
291
|
|
|
273
292
|
### DOM extension by xmldom
|
|
274
293
|
|
|
275
294
|
* [Node] Source position extension;
|
|
276
295
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
//Numbered starting from '1'
|
|
281
|
-
columnNumber
|
|
296
|
+
attribute:
|
|
297
|
+
- `lineNumber` //number starting from `1`
|
|
298
|
+
- `columnNumber` //number starting from `1`
|
|
282
299
|
|
|
283
300
|
## Specs
|
|
284
301
|
|
|
@@ -336,4 +353,4 @@ xmldom has an own SAX parser implementation to do the actual parsing, which impl
|
|
|
336
353
|
- `XMLReader`
|
|
337
354
|
- `DOMHandler`
|
|
338
355
|
|
|
339
|
-
There is an idea/proposal to make
|
|
356
|
+
There is an idea/proposal to make it possible to replace it with something else in <https://github.com/xmldom/xmldom/issues/55>
|