Output :
<div id="header"></div>
<div id="body">
<hello>
<world></world>
</hello>
</div>
Corresponds to :
div#header+div#body>hello>world
What command to use to get the output like below ?
<div id="header">
<hello2>
<world2></world2>
</hello2>
</div>
<div id="body">
<hello>
<world></world>
</hello>
</div>
You can use parenthesis to create groups of nested elements:
(#header>hello2>world2)+(#body>hello>world)Actually, in this example, the second set of parenthesis isn’t necessary, because the first set creates the first group, which is enough:
(#header>hello2>world2)+#body>hello>world