diff --git a/DESCRIPTION b/DESCRIPTION index b44131b1..dcd3bb43 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: xml2 Title: Parse XML -Version: 1.3.2.9000 +Version: 1.3.2.9001 Authors@R: c(person(given = "Hadley", family = "Wickham", @@ -40,7 +40,7 @@ VignetteBuilder: knitr Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.1.0 +RoxygenNote: 7.1.1 SystemRequirements: libxml2: libxml2-dev (deb), libxml2-devel (rpm) Collate: diff --git a/NEWS.md b/NEWS.md index 13cf97f4..37ac7995 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # xml2 (development version) +* `xml_find_all.xml_nodeset()` gains a `flatten` argument to control whether to return a single nodeset or a list of nodesets (#311, @jakejh) + * `write_xml()` and `write_html()` now return NULL invisibly, as they did prior to version 1.3.0 (#307) # xml2 1.3.2 diff --git a/R/xml_find.R b/R/xml_find.R index efbf17cb..14113220 100644 --- a/R/xml_find.R +++ b/R/xml_find.R @@ -12,9 +12,11 @@ #' @param xpath A string containing a xpath (1.0) expression. #' @inheritParams xml_name -#' @return `xml_find_all` always returns a nodeset: if there are no matches -#' the nodeset will be empty. The result will always be unique; repeated -#' nodes are automatically de-duplicated. +#' @param ... Further arguments passed to or from other methods. +#' @return `xml_find_all` returns a nodeset if applied to a node, and a nodeset +#' or a list of nodesets if applied to a nodeset. If there are no matches, +#' the nodeset(s) will be empty. Within each nodeset, the result will always +#' be unique; repeated nodes are automatically de-duplicated. #' #' `xml_find_first` returns a node if applied to a node, and a nodeset #' if applied to a nodeset. The output is *always* the same size as @@ -46,11 +48,16 @@ #'
Some text.
+Some other text.
+No bold here!