3 ms·
Not a big deal. You can make a DOM from anything. In fact, the invalid case is exactly why you'd use this technique. If you use a bunch of regular expression
by jrockway 16y ago
Not a big deal. You can make a DOM from anything.
In fact, the invalid case is exactly why you'd use this technique. If you use a bunch of regular expressions, you can probably make something that works on a subset of valid inputs. If you want it to work on everything, then you need to use a parser to generate a DOM, and then interact with the DOM.