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,566
  • 2
  • 17
  • 20

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
  • 84,125
  • 8
  • 85
  • 148