Suppose I have this structure:
<one>
<two>
<three>3</three>
</two>
<two>
<three>4</three>
</two>
<two>
<three>3</three>
</two>
</one>
Is there any way to get this:
<one>
<two>
<three>3</three>
</two>
<two>
<three>4</three>
</two>
</one>
using Ruby libraries? I managed to get this using Nokogiri. From my tests, this works, but maybe there is a different approach, the best.
source
share