0

Just like in the question. For example I make a request and get a html document with multiple td tags, how to retrieve the data? Do I need to learn regex?

youbetternot
  • 2,186
  • 2
  • 15
  • 18

1 Answers1

0

No, you don't need a regex. You can use https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/HTML_in_XMLHttpRequest to get a DOM object, which you can query by the usual methods (CSS selectors, XPath, manual tree walking, etc).

There's also DOMParser for when you only have an HTML string.

melpomene
  • 81,915
  • 7
  • 76
  • 137