Add a -f<n> option to the sel feature to print only lines from depth N. the goal would be to print lines from depth 1 to depth 2 by combining -f1 and -d2. This could be usefull to print iteratively the elements of an xml file in order to generate the structure of a splitted xsd file. for instance the root and its first dependencies (-f0 -d1), then the first level and its first dependencies (-f1 -d1). Thank you in advance.
read -f1 -d2 in the last example.
read add #xmlstarlet el -f<n> !