xml-twig 1.0.3 → 1.0.4
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
|
@@ -248,7 +248,7 @@ Here are some examples the get attribute and values:
|
|
|
248
248
|
.attribute((key, val) => { return key === 'age' && val > 50 })) => { "age": 59 }
|
|
249
249
|
```
|
|
250
250
|
|
|
251
|
-
#### Twig Methods,
|
|
251
|
+
#### Twig Methods, accessing XML Elements
|
|
252
252
|
|
|
253
253
|
`.root()` - **Twig**: The topmost element of the tree
|
|
254
254
|
|
|
@@ -262,9 +262,9 @@ Here are some examples the get attribute and values:
|
|
|
262
262
|
|
|
263
263
|
`.previous(condition)` - **Twig**: Return the previous elt (optionally matching condition) of the element. This is the first element which opens before the current one. It is usually either the last descendant of the previous sibling or simply the parent
|
|
264
264
|
|
|
265
|
-
`.first(condition)` - **Twig**: Returns the first
|
|
265
|
+
`.first(condition)` - **Twig**: Returns the first (optionally matching condition) element. Usually the `root` element.
|
|
266
266
|
|
|
267
|
-
`.last(condition)` - **Twig**: Returns the last
|
|
267
|
+
`.last(condition)` - **Twig**: Returns the last (optionally matching condition) element. Usually the last element in the document without children.
|
|
268
268
|
|
|
269
269
|
`.ancestor(condition)` - **Twig[]**: All ancestors (parent, grandparent, etc.) of the current element (optionally matching condition) or an empty array.
|
|
270
270
|
|