Skip to content

xml2 1.3.6

xml2 1.3.5

CRAN release: 2023-07-06

xml2 1.3.4

CRAN release: 2023-04-27

  • Fixes for R CMD check problems.

  • Windows: update to libxml2 2.10.3

xml2 1.3.3

CRAN release: 2021-11-30

  • Hadley Wickham is now (again) the maintainer.

  • xml2 has been re-licensed as MIT (#317).

  • xml_find_all.xml_node() fails more informatively the xpath parameter is the wrong type (@michaelchirico)

  • 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)

  • XPtr gets explicit copy constructor and assignment operator definitions, which were two missing components of the Rule of three (@michaelchirico)

  • Windows: update to libxml2 2.9.10 and libxslt 1.1.34 and add ucrt libs

xml2 1.3.2

CRAN release: 2020-04-23

xml2 1.3.1

CRAN release: 2020-04-09

  • read_html() now again works with HTML files with non-ASCII encodings (#293).

xml2 1.3.0

CRAN release: 2020-04-01

  • Removes the Rcpp dependency

xml2 1.2.5

CRAN release: 2020-03-11

  • Fix compilation issue on macOS versions after High Sierra when not using homebrew supplied libxml2

xml2 1.2.4

CRAN release: 2020-03-10

  • Fix potential dangling pointer with internal asXmlChar() function (@michaelquinn32, #287).

  • as_xml_document() now handles cases with text nodes trailing normal nodes (#274).

  • xml_add_child() can now create nodes with a par attribute. These previously errored due to partial name matching of the parent function in the internal create_node() function. (@jennybc, #285)

  • libxml2_version() now returns a semantic version rather than alphanumeric version, so “2.9.10” > “2.9.9” (#277)

xml2 1.2.2

CRAN release: 2019-08-09

  • Export S4 classes with documentation, so they can be used in other packages without Warnings (@nuest, #267)

xml2 1.2.1

CRAN release: 2019-07-29

New Features

Bugfixes and Miscellaneous features

  • Generic xml2 error are now forwarded as R errors. Previously these errors were output to stderr, so could not be suppressed (#209).

  • Fix for ICU 59+ defaulting to use char16_t, which is only available in C++11 (#231)

  • No longer uses the C connections API

  • Better error message when trying to run download_xml() without the curl package installed (#262)

  • xml2 classes are now registered for use with S4 by calling setOldClass() (#248)

  • Nodes with nested data type definition entities now work without crashing (#241)

  • Test failure fixed due to behavior change with relative paths in libxml2 2.9.9 (#245).

  • read_xml() now has a better error message when given zero length character inputs (#212).

  • read_xml() and read_html() now automatically check if the response succeeded before trying to read from a HTTP response (#255).

  • xml_root() can now create root nodes with namespaces (#239)

  • xml_set_attr() no longer crashes if you try to set the same namespace on the same node multiple times (#253).

  • xml_set_attr() now recycles the values if needed (#221)

  • xml_structure() gains a file argument, to support writing to a file rather than the console (#244).

xml2 1.2.0

CRAN release: 2018-01-24

Breaking changes

  • as_list() on xml_document objects did not properly include the root node in the returned list. Previous behavior can be obtained by using as_list()[[1L]] in place of as_list().

New Features


  • xml_find_first() no longer de-duplicates results, so the results are always the same length as the inputs (as documented) (#194).

  • xml2 can now build using libxml2 2.7.0

  • Use Rcpp symbol registration and visibility to prevent symbol conflicts on Linux

  • xml_add_child() now requires less resources to insert a node when called with .where = 0L (@heckendorfc, #175).

  • Fixed failing examples due to a change in an external resource.

xml2 1.1.1

CRAN release: 2017-01-24

  • This is a small point release addressing installation issues found with older libxml2 versions shipped with RedHat Linux 6 / CentOS 6 (#163, #164).

xml2 1.1.0

CRAN release: 2017-01-07

New Features


  • xml_new_document() now explicitly sets the encoding (default UTF-8) (#142)

  • Document formatting options for write_xml() (#132)

  • Add missing methods for xml_missing objects. (#134)

  • Bugfix for xml_length.xml_nodeset that caused it to fail unconditionally. (#140)

  • now returns TRUE for xml_missing objects. (#139)

  • Trim non-breaking spaces in xml_text(trim = TRUE) (#151).

  • Allow setting non-character attributes (values are coerced to characters). (@sjp, #117, #122).

  • Fixed return value in call to vapply in xml_integer.xml_nodeset. (@ddiez, #146, #147).

  • Allow docs missing a root element to be created and printed. (@sjp, #126, #121).

  • xml_add_* methods now return invisibly. (@sjp, #124)

  • as_list() now preserves element names when attributes exist, and escapes XML attributes that conflict with special R attributes (@peterfoley, #115).

xml2 1.0.0

CRAN release: 2016-06-24

xml2 0.1.2

CRAN release: 2015-09-01

  • Improved configure script - now works again on R-devel on windows.

  • Compiles with older versions of libxml2.,

xml2 0.1.1

CRAN release: 2015-06-02

  • Make configure script more cross platform.

  • Add xml_length() to count the number of children (#32).