fold xpath [expression]


This feature is still EXPERIMENTAL! Fold command may be used to mark elements matching the xpath with a xsh:fold attribute from the namespace. When listing the DOM tree using ls xpath fold, elements marked in this way are folded to the depth given by the expression (default depth is 0 = fold immediately).

xsh> fold //chapter 1
xsh> ls //chapter[1] fold
<chapter id="intro" xsh:fold="1">

See Also

unfold, ls