I have a feed without a proper way to limit the amount of items returned, it would be nice if feed import would allow you to specify a limit.

Comments

Sorin Sarca’s picture

Well, for this you'll need to write your own process function (based on processXML or similar). Please check README.txt to see how to create your process function.

Checking in each loop if limit is reached will slow down import and we don't want that.
If you need help with process function just write it here.

Sorin Sarca’s picture

I completly forgot about xpath's position() function! You can use this to limit your results, just add it in "Enter parent item xpath" field.
Let's say our parent xpath is

//vehicles/cars

and to get only first 10 cars we can use

//vehicle/cars[position() <= 10]

Note: this don't work for processXMLChunked and processXmlReader functions!

Sorin Sarca’s picture

Status: Active » Closed (works as designed)