xml-twig 1.0.4 → 1.0.6
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/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -276,7 +276,7 @@ Here are some examples the get attribute and values:
|
|
|
276
276
|
|
|
277
277
|
`.sibling(condition)` - **Twig[]**: All siblings (optionally matching condition) before and after the current element or an empty array.
|
|
278
278
|
|
|
279
|
-
`.siblingOrSelf(condition)` - **Twig[]**: All siblings (optionally matching condition) before and after the current element or an empty array.
|
|
279
|
+
`.siblingOrSelf(condition)` - **Twig[]**: All siblings (optionally matching condition) before and after the current element and the current element itself or an empty array.
|
|
280
280
|
|
|
281
281
|
`.followingSibling(condition)` - **Twig[]**: All siblings (optionally matching condition) after the current element or an empty array.
|
|
282
282
|
|
|
@@ -288,7 +288,7 @@ Here are some examples the get attribute and values:
|
|
|
288
288
|
|
|
289
289
|
`.find(condition)` - **Twig**: Find a specific element in current element and returns the first match. In principle `.descendant(condition)[0]`
|
|
290
290
|
|
|
291
|
-
`.purge()` - void: Removes the current element from
|
|
291
|
+
`.purge()` - void: Removes the current element from tree. Usually this methond is called after the element has been processed and when not needed anymore.
|
|
292
292
|
|
|
293
293
|
`.purgeUpTo(elt)` - void: Purges up to the elt element. This allows you to keep part of the tree in memory when you purge.
|
|
294
294
|
|
|
@@ -369,7 +369,7 @@ For methods which return a single **Twig** element (e.g. `elt.next("book")`) the
|
|
|
369
369
|
|
|
370
370
|
This `xml-twig` module focus on reading a XML files. In principle it would be possible to create a XML file from scratch with the [Twig](./doc/twig.md#Twig) class. However, I think there are better modules available. Create/update/delete methods are rather limited. Perhaps I will add it in later release.
|
|
371
371
|
|
|
372
|
-
Accessing Twig-Elements by [XML-Path](https://www.w3.org/TR/xpath/) language is not supported. One reason it, the `Twig` class models more
|
|
372
|
+
Accessing Twig-Elements by [XML-Path](https://www.w3.org/TR/xpath/) language is not supported. One reason it, the `Twig` class models more an [Element](https://www.w3schools.com/xml/xml_elements.asp) rather than a [Node](https://www.w3schools.com/xml/dom_nodes.asp) which would be more generic.
|
|
373
373
|
|
|
374
374
|
|
|
375
375
|
|