1

I want to use ArrayList with url from xml:

<rss version="2.0" xmlns:mailru="https://news.mail.ru/">
    <channel>
      <item>
         <enclosure url="https://news.mail.ru/pic/a7/a4/main24128764_eb1fd077a98a69823f0661e5ccb4b505.jpg#620#388" type="image/jpeg" />

I use this:

@XmlPath("channel/item/enclosure/[@url]/text()")
private ArrayList <String> urls;

but it is not work. Please help.

1 Answer 1

1

the correct xpath is

channel/item/enclosure/@url

will give you the value of the url attribute of the node enclosure

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.