The reason I was looking at this is sometimes the order of the groups changes
in the output. So, if I have this:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<div2/>
<div2/>
<div1/>
<div1/>
<div2/>
<div2/>
<div1/>
</root>
I sometimes need this:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<div1>
<div2/>
<div2/>
</div1>
<div1>
<div2/>
<div2/>
</div1>
<div1/>
</root>
In other words, in the final output, any non-div1 elements have to be included
in the first div1 to make the output document valid.
Rick
|