cobwebch / external_import

Other
20 stars 16 forks source link

arrayPath 'No configuration.' #330

Closed jblechinger closed 4 months ago

jblechinger commented 4 months ago

Hello, i trie to get the country from the following xml:

nodetype is set to 'jobPublication'

<list>
    <jobPublication>
        <id>1234</id>
        <jobOpening>
            <locations>
                <location>
                    <country>
                        <name>Deutschland</name>
                        <isoA2>DE</isoA2>
                    </country>
                </location>
            </locations>
        </jobOpening>
    </jobPublication>
</list>

I tried a lot of different variations of the following 'arrayPath':

        'country' => [
            'exclude' => true,
            'label' => 'Country',
            'config' => [
                'type' => 'input',
                'size' => 90,
                'eval' => 'trim',
            ],
            'external' => [
                0 => [
                    'arrayPath' => 'jobOpening/locations/location/country/name',
                ]
            ]
        ],

In the 'column Mapping' tab of the backend it says:

image

Can someone please help me go extract nested xml Data?

fsuter commented 4 months ago

Hi. You can't use arrayPath here, because you're in a XML structure. You need to use xpath instead (https://docs.typo3.org/p/cobweb/external_import/7.2/en-us/Administration/Columns/Index.html#xpath).

jblechinger commented 4 months ago

Thanks for the quick help :)