HTMLRewritter - Dealing with nested nodes

I'm having a hard time figuring out How to use HTMLRewritter. I have an XML-like structure, small snippets, like so:
<y>
  <a>xxx</a>
  <b>xxx</b>
  <c>xxx</c>
</y>

I want to transform it like so:
<y>
  <s>
    <a>xxx</a>
    <b>xxx</b>
  </s>
  <c>xxx</c>
</y>

Any ideas?
Was this page helpful?