0

I have html tag like this:

<img src="/someLink" class="class" alt="some info "quoted info", some info" />

I need to select this tag by 'alt' value by the means of jsoup.

I've tried these options:

img[alt="some info "quoted info", some info"]

img[alt="some info \"quoted info\", some info"]

Nothing worked.

Please explain - how to properly select some element by parameter that includes quotation marks ?

Thank you.

Alfred Moon
  • 987
  • 1
  • 10
  • 21
  • 1
    are you sure this is a valid html? _some info _ – Sfili_81 Oct 08 '19 at 10:30
  • I am noob in the html world, but this is example from real website that I am trying to get info from. Without real class names, links and etc. of course. – Alfred Moon Oct 08 '19 at 10:34
  • 1
    inside alt="some info quoted info" you have an extra quote. this is not correct.[https://stackoverflow.com/questions/4015345/how-do-i-properly-escape-quotes-inside-html-attributes](https://stackoverflow.com/questions/4015345/how-do-i-properly-escape-quotes-inside-html-attributes) – Sfili_81 Oct 08 '19 at 11:43

0 Answers0