The XPath implementation only supports a few features of xpath.

But, you can give it an XSL script that transforms the incoming XML before it hits the XPathEntityProcessor. You can use this to boil down the incoming to a simple format with the things you want.

yklxmas wrote:
Hi guys,

I'm trying to map a field to name of an element in DIH. Is this possible?
I'm not sure the limitation of solr on xpath.

This is my sample xml

<manifest>
    <metadata></metadata>
    <resources>
       <audio></audio>
    </resources>
</manifest>

I've tried
<field column="resource_type" xpath="/manifest/resources/*[last]/name()" />.
Doesn't seem to do anything.

<field column="resource_type" xpath="node-name(/manifest/resources/*[last])"
/>. This throws exception as xpath must start with "/"

Can anyone help, please? Many thanks in advance.

Reply via email to