Good day.

I have such an xml file:

<categories>
    <category id="1">Cat. 1</category>
    <category id="2">Cat. 2</category>
</categories>

All I need is to import category as term to my vocbulary. But I can't figure out how to do such thing.
My problem is that I cant configure importer properly. Next thing doesn't work, cuz title will be empty:

context: //categories/*
id: @id
title: category 

If I go another way

context: /categories
title: category
id: category/@id

I will recieve two arrays: titles, id's. No taxonomy term will be added due to data type (array). So I can't split that array to get 1 (title,id) => 1 new term.

Comments

ar7max’s picture

Assigned: ar7max » Unassigned
twistor’s picture

Status: Active » Fixed
Issue tags: -xml feeds taxonomy

Try this one:

context: /categories/category
title: text()
id: @id

title could also be .

ar7max’s picture

#2 works perfect, thanks. Where can I reed about commands like text()?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

firfin’s picture

ALso very interested how to find out about where to find out about 'text()' or '.'