I have xml files which look like:
<a>
<s> blah blah </s>
<s> bleep
<t> something different </t>
bloop</s>
<s> bleh bleh </s>
</a>
and would like to move the <t> elements up one level, without changing the text flow : in other words I want it to look like
<a>
<s> blah blah </s>
<s> bleep </s>
<t> something different </t>
<s> bloop</s>
<s> bleh bleh </s>
</a>
I am using java with jdom2, and there must surely be a straightforward method for this, but I can't find it. Any elegant ideas? Thanks!
Ok, here is how I ended up doing it inelegantly by hand, for posterity: