0

I have a string containing some HTML content including multiple elements that match the following scheme:

<a data-pdf-link="/path/to/the/file.pdf" class="tocPdfContainer" href="#" > Some title <i class="fa fa-download"></i></a>

Now I want to get an array which contains all of the HTML-String's <a>-Elements so I can extract each's PDF link and title. How can I do that?

Vinner
  • 31
  • 7
  • https://stackoverflow.com/questions/31080818/what-is-the-best-practice-to-parse-html-in-swift. Hope this helps!! – Vinayaka S Y May 23 '20 at 19:53
  • Does this answer your question? [What is the best practice to parse html in swift?](https://stackoverflow.com/questions/31080818/what-is-the-best-practice-to-parse-html-in-swift) – Magnas May 23 '20 at 20:10
  • Thanks, it works fine with SwiftSoup! – Vinner May 24 '20 at 00:25

0 Answers0