Xpath and Roku : How to retrieve value

Tags: #<Tag:0x00007f6168f04120> #<Tag:0x00007f6168f0bf88> #<Tag:0x00007f6168f0b970>


I am trying to retrieve a value from the XML generated by my roku :
The xml looks like this :

<root xmlns="urn:schemas-upnp-org:device-1-0">
<modelDescription>Roku Streaming Player Network Media</modelDescription>
<modelName>Roku 3</modelName>

And the code looks like this :

But I get nothing (empty value)

I have also tried different things :

But I still can’t find the correct way to do it.

Could someone help me with the Xpath Syntax ?

Best Regards

You might be interested in Roku Support

There he is using //serial-number for the XPath. You can try //friendlyName or if you want to be more specific maybe try //root/device/friendleName.

Thanks, it seems to work when the XML does not contain the <root> part like in the link you provided.
In my example, it contained this <root> and the //friendleName still won’t work.
Anyway, I used the API urls and it works now.