I need to use the XMLFeatureMapper in a script, and I want to exclude nodes that contain a specific selfclosed tag.
if the xmls is
<feature>
<ID>1</ID>
</feature>
<feature>
<ID>2</ID>
<at1 name="a"/>
</feature>
<feature>
<ID>3</ID>
</feature>
I want to read in only feature 1 and 3, excluding all features with tag <at1 />.
I'm really not familiar with xfmap, but managed to get the following to read in all features:
<xfMap> <feature-map> <mapping match=feature"> <feature-type> <literal expr="feature"/> </feature-type> <attributes> <attribute> <name> <literal expr="ID"/> </name> <value> <extract expr="./ID"/> </value> </attribute> <attribute> <name> <literal expr="attribute1"/> </name> <value> <extract expr="./at1a@name]"/> </value> </attribute> </attributes> </mapping> </feature-map> </xfMap>
But i really want something to exclude the feature if it contains the tag, something like <mapping match="feature" except ="feature.at1"> but that is not the right syntax.
help?