Feed Creator CSS Selectors

What, if any, CSS selectors are supported in targeting specific elements that don’t contain classes/IDs?

May 2021: The latest information on CSS selectors supported by Feed Creator are here: CSS Selectors | FiveFilters.org Docs

Hi Brian,

We rely on Zend Frameworks’s CSS to XPath class. You can see it here: http://code.fivefilters.org/full-text-rss/src/8f5d813459ebe822330e21662649353732159dc6/libraries/Zend/Dom/Query/Css2Xpath.php

The functions transform() and _tokenize() should give you an idea of what it supports. These should work, in addition to id/class selectors:

// Child selectors
e.g. div > p > a

// arbitrary attribute strict equality
e.g. div[width = “400”]

// arbitrary attribute contains full word
e.g. div[class ~= “main”]

// arbitrary attribute contains specified content
e.g. div[href *= “articles/”]

Of course you’ll have to URL encode these first.

We might also update the class to something more powerful in the future.

Hope that’s some help.