Jarry wrote:
I was editing a huge XML file that a friend of mine had made and I
didn't need some of the tags. WHen I was finished editing it, I
realised I had a lot of information between tags, in no man's land. eg:
They're not in "no man's land", they're text children of the <player>
element that aren't children of another element.
You've already had one good answer to this, but my personal choice
would be to use XSLT.
First of all, find the XSLT "identity" stylesheet (web search, I'm too
lazy). This copies input documents exactly, without changing them. Then
(a very useful general XSLT technique) add particular template rules to
this to cope with the situations where you don't want a simple identity
copy. In your case this would be something like this
<xsl:template match="player" >
<player>
<xsl:apply-templates select="*" />
</player>
</xsl:template>