# XPATH for Dummies

**URL:** <https://forums.plex.tv/t/xpath-for-dummies/43852>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [October 2, 2013, 4:16pm UTC](https://forums.plex.tv/t/xpath-for-dummies/43852 "2013-10-02T16:16:20Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![shopgirl284](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@shopgirl284](https://forums.plex.tv/u/shopgirl284)\
**Post date:** [November 9, 2013, 12:09am UTC](https://forums.plex.tv/t/xpath-for-dummies/43852/4 "2013-11-09T00:09:42Z")

</div>

I just found a new trick for using the contains command in xpath. When you want to find two separate strings that occur in an attribute of a tag. &nbsp;You just write two different contains and use and/or in between.

Example:

```
url = html.xpath('//li[contains(@class,"-navigation") and contains(@class,"-right")]/a//@href')[0]
```

The example above will look for a

- One thing I found is that there can be no overlap in the characters used in each strings. In the example above, I first tried to use:

- &nbsp;'-navigation-right'

---

_[View the full topic](https://forums.plex.tv/t/xpath-for-dummies/43852)._
