# Need help on XPath to parse some string from XML (for vdr-plex.bundle)

**URL:** <https://forums.plex.tv/t/need-help-on-xpath-to-parse-some-string-from-xml-for-vdr-plex-bundle/153710>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [August 4, 2016, 6:22am UTC](https://forums.plex.tv/t/need-help-on-xpath-to-parse-some-string-from-xml-for-vdr-plex-bundle/153710 "2016-08-04T06:22:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iPhonedation](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/iphonedation/32/82088_2.png) [@iPhonedation](https://forums.plex.tv/u/iPhonedation)\
**Post date:** [August 4, 2016, 6:22am UTC](https://forums.plex.tv/t/need-help-on-xpath-to-parse-some-string-from-xml-for-vdr-plex-bundle/153710/1 "2016-08-04T06:22:42Z")

</div>

Hi everybody,

I am after a while (2 years) working a bit on the livetv.bundle for VDR. And one thing I wanted to try is to access more information and pictures via a restful API that can be installed into vdr.

Here is my issue now - I can with an online tool or Xmplify access the right node and get a string, but it doesn’t seem to work in the **init**.py code.

Code:

```auto
                try:
                artPath = currentEpg.xpath('//epg:param[@name="additional_media"]/poster/@path', namespaces=NAMESPACEEPG)[0]
                Log ("Art %s" % artPath)

```

While the xml is here [http://pastebin.com/bPttVUDF](http://pastebin.com/bPttVUDF)

What am I doing wrong in the python code ? Any kind of help is highly appreciated 🙂 I basically want to access the pictures, the actors, etc and see what I can do to enrich the info presented in the channel.

Kind regards & thanks a lot,  
Alex

---

<div class="post-metadata">

**Author:** ![sander1](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sander1](https://forums.plex.tv/u/sander1)\
**Post date:** [August 6, 2016, 1:17pm UTC](https://forums.plex.tv/t/need-help-on-xpath-to-parse-some-string-from-xml-for-vdr-plex-bundle/153710/2 "2016-08-06T13:17:23Z")

</div>

Hi!  
Can you post the complete ` __init__.py` file to [Pastebin](http://pastebin.com/ "Pastebin") please?

---

<div class="post-metadata">

**Author:** ![iPhonedation](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/iphonedation/32/82088_2.png) [@iPhonedation](https://forums.plex.tv/u/iPhonedation)\
**Post date:** [October 22, 2016, 9:17am UTC](https://forums.plex.tv/t/need-help-on-xpath-to-parse-some-string-from-xml-for-vdr-plex-bundle/153710/3 "2016-10-22T09:17:51Z")

</div>

Hi sander1

as I switched the setup to mainly run with TVH for now I did not follow up… I found a good client for tvOS that replaces the live TV channel for plex for my family.

Thanks a lot though!

A

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 8, 2020, 7:58pm UTC](https://forums.plex.tv/t/need-help-on-xpath-to-parse-some-string-from-xml-for-vdr-plex-bundle/153710/4 "2020-01-08T19:58:53Z")

</div>


