instant-articles-builder
instant-articles-builder copied to clipboard
Add support for XPath selectors
Some of the default rules defined in the SDK use XPath selectors. Should we also add support for them?
Example:
{
"class": "InstantArticleRule",
"selector": "head",
"properties": {
"article.canonical": {
"type": "string",
"selector": "link",
"attribute": "href"
},
"article.charset": {
"type": "xpath",
"selector": "//meta[@charset]",
"attribute": "charset"
},
"article.markup.version": {
"type": "xpath",
"selector": "//meta[@property='op:markup_version']",
"attribute": "content"
},
"article.auto.ad": {
"type": "xpath",
"selector": "//meta[@property='fb:use_automatic_ad_placement']",
"attribute": "content"
},
"article.style": {
"type": "xpath",
"selector": "//meta[@property='fb:article_style']",
"attribute": "content"
}
}
}