Skip to content

Commit

Permalink
Update description
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWr committed Oct 7, 2022
1 parent f358b8a commit cf1f380
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/scriptlets/xml-prune.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
* example.org#%#//scriptlet('xml-prune'[, propsToMatch[, optionalProp[, urlToMatch]]])
* ```
*
* - `propsToMatch` - required, selector of elements which will be removed from XML
* - `propsToMatch` - optional, selector of elements which will be removed from XML
* - `optionalProp` - optional, selector of elements that must occur in XML document
* - `urlToMatch` - optional, string or regular expression for matching the request's URL
*
Expand All @@ -35,6 +35,11 @@ import {
* ```
* example.org#%#//scriptlet('xml-prune', 'Period[id*="-ad-"]', '', '.mpd')
* ```
*
* 4. Call with no arguments will log response payload and URL at the console
* ```
* example.org#%#//scriptlet('xml-prune')
* ```
*/
/* eslint-enable max-len */

Expand Down
7 changes: 6 additions & 1 deletion wiki/about-scriptlets.md
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Removes an element from the specified XML.
example.org#%#//scriptlet('xml-prune'[, propsToMatch[, optionalProp[, urlToMatch]]])
```
- `propsToMatch` - required, selector of elements which will be removed from XML
- `propsToMatch` - optional, selector of elements which will be removed from XML
- `optionalProp` - optional, selector of elements that must occur in XML document
- `urlToMatch` - optional, string or regular expression for matching the request's URL
Expand All @@ -1725,6 +1725,11 @@ example.org#%#//scriptlet('xml-prune'[, propsToMatch[, optionalProp[, urlToMatch
example.org#%#//scriptlet('xml-prune', 'Period[id*="-ad-"]', '', '.mpd')
```
4. Call with no arguments will log response payload at the console
```
example.org#%#//scriptlet('xml-prune')
```
[Scriptlet source](../src/scriptlets/xml-prune.js)
* * *

0 comments on commit cf1f380

Please # to comment.