You could use XSLT:
This XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<forms>
<form name="form1">
<tab name="3rd party tab A">
...
</tab>
<xsl:call-template name="std-tab"/>
</form>
<form name="form2">
<tab name="3rd party tab B">
...
</tab>
<xsl:call-template name="std-tab"/>
</form>
</forms>
</xsl:template>
<xsl:template name="std-tab">
<tab name="Our standard tab">
...
</tab>
</xsl:template>
</xsl:stylesheet>
Run against any XML file (<dummy/>
would do) will yield the WET version of your XML:
<?xml version="1.0" encoding="UTF-8"?>
<forms>
<form name="form1">
<tab name="3rd party tab A">
...
</tab>
<tab name="Our standard tab">
...
</tab>
</form>
<form name="form2">
<tab name="3rd party tab B">
...
</tab>
<tab name="Our standard tab">
...
</tab>
</form>
</forms>
Note: There's much more power to be tapped using this approach than the external entities approach. You can further abstract the form definition and actually pull parameters and structures from there rather than use a dummy input XML file. However, the XSLT approach does require another tool that may not already be in your tool chain; external entities will work as-is with compliant XML parsers.