diff options
| author | Markus Birth <markus@birth-online.de> | 2013-04-11 15:56:46 +0200 |
|---|---|---|
| committer | Markus Birth <markus@birth-online.de> | 2013-04-11 15:56:46 +0200 |
| commit | 5a5728ef4d0b0291b039cf1942e87cc8d621d00b (patch) | |
| tree | 43ec9d33bd29d950effbbfe164d08d41ed95abf1 /README.md | |
| parent | 58fc79ea37435fe7adbbad4314e1b3f442aad714 (diff) | |
| download | yafpp-5a5728ef4d0b0291b039cf1942e87cc8d621d00b.tar.gz yafpp-5a5728ef4d0b0291b039cf1942e87cc8d621d00b.zip | |
XPath explanation in README, some new mods
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -66,3 +66,54 @@ The **xpath** value is the actual Xpath-element to fetch from the linked page. O If you get an error about "Invalid JSON!", you can use [JSONLint](http://jsonlint.com/) to locate the erroneous part. + + +XPath +----- + +### Tools + +To test your XPath expressions, you can use these Chrome extensions: + +* [XPath Helper](https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl) +* [xPath Viewer](https://chrome.google.com/webstore/detail/xpath-viewer/oemacabgcknpcikelclomjajcdpbilpf) +* [xpathOnClick](https://chrome.google.com/webstore/detail/xpathonclick/ikbfbhbdjpjnalaooidkdbgjknhghhbo) + + +### Examples + +Some XPath expressions you could need (the `//` is automatically prepended and must be omitted in the FeedMod configuration): + +##### HTML5 <article> tag + +```html +<article>…article…</article> +``` + +```xslt +//article +``` + +##### DIV inside DIV + +```html +<div id="content"><div class="box_content">…article…</div></div>` +``` + +```xslt +//div[@id='content']/div[@class='box_content'] +``` + +##### Multiple classes + +```html +<div class="post-body entry-content xh-highlight">…article…</div> +``` + +```xslt +//div[starts-with(@class ,'post-body')] +``` +or +```xslt +//div[contains(@class, 'entry-content')] +``` |
