I have an xml file such as :
<Content>
<a n="test1">value1</a>
<a n="test2">value2</a>
<a n="test3">value3</a>
...
</Content>
i am trying to read this content with an xfmap script ( through an XMLFeatureMapper)
I want to create a Feature by "a" element with :
- an attribute named "name" -> the value of the attribute "n"
- an attribute named "value" -> the value of the element "a"
I was hoping to make this like :
<?xml version="1.0"?>
<xfMap>
<feature-map multi-feature-construction="true">
<mapping match="a">
<feature-type> <literal expr="Content"/> </feature-type>
</mapping>
</feature-map>
<feature-content-map>
<mapping match="a">
<attributes>
<attribute>
<name> <literal expr="NAME"/> </name>
<value> <extract expr="@n"/> </value>
</attribute>
</attributes>
</mapping>
<mapping match="DT">
<attributes>
<attribute>
<name> <literal expr="VALUE"/> </name>
<value> <extract expr="."/> </value>
</attribute>
</attributes>
</mapping>
</feature-content-map>
</xfMap>
Anyone can help ? :)
Thanks,
Julien