Return all nodes in @var{dom} that have IDs that match @var{match},
which is a regular expression.
+@item dom-strings @var{dom}
+Return all strings in @var{DOM}.
+
@end table
Utility functions:
2015-01-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * dom.el (dom-strings): New function.
+
* files.el (directory-files-recursively): Don't use the word
"path" for a file name.
(cons dom matches)
matches)))
+(defun dom-strings (dom)
+ "Return elements in DOM that are strings."
+ (cl-loop for child in (dom-children dom)
+ if (stringp child)
+ collect child
+ else
+ append (dom-strings child)))
+
(defun dom-by-class (dom match)
"Return elements in DOM that have a class name that matches regexp MATCH."
(dom-elements dom 'class match))