Skip to content

xml2

1.6.0

Parse XML

480packages dependsuggested by 215
11.5Mdownloads / year
88.6%test coverage
13/13flavors OK

Overview

About

Bindings to 'libxml2' for working with XML data using a simple, consistent interface based on 'XPath' expressions. Also supports XML schema validation; for 'XSLT' transformations see the 'xslt' package.

Changes in 1.6.0
  • xml_add_child() without .where argument is now much faster. The default is now NULL and still means "append after the last child".
  • read_html() now defaults to encoding = "UTF-8" to prevent double-encoding of UTF-8 content on Windows with codepage 65001 (#490).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 3.2 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-09-25
  • ERROR12 OK, 1 ERROR2026-09-09
  • OK13 OK2026-09-01
  • ERROR12 OK, 1 ERROR2026-08-25
  • OK13 OK2026-08-09
Show 20 earlier changesHide 20 earlier changes
  • ERROR12 OK, 1 ERROR2026-08-06
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-27
  • ERROR12 OK, 1 ERROR2026-06-24
  • OK13 OK2026-05-24
  • ERROR12 OK, 1 ERROR2026-05-14
  • OK13 OK2026-05-11
  • ERROR12 OK, 1 ERROR2026-05-10
  • OK13 OK2026-05-08
  • ERROR11 OK, 2 ERROR2026-05-04
  • OK13 OK2026-04-30
  • ERROR12 OK, 1 ERROR2026-04-28
  • OK14 OK2026-04-24
  • ERROR13 OK, 1 ERROR2026-04-22
  • OK14 OK2026-04-20
  • ERROR13 OK, 1 ERROR2026-04-16
  • OK14 OK2026-03-30
  • ERROR13 OK, 1 ERROR2026-03-29
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.6.0
READMEYes · 252 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.6.0Citation fileNoWebsiteYes · pkgdown
Help pages
31 (3 internal)includes a package overview page
Examples that run
96%23 run in a plain check · 1 never run
Exported functions with examples
83%
Documented parameters
98%
Return-value docs
55%
Help pages citing references
0%
Vignettes (1)

Downloads

11.5M
CRAN downloads in the past year
Rank #76 · ~31.6K/day · ~960.5K/mo
Daily download trend is not available in this view yet.
863.4K30 days
2.5M90 days
11.5M1 year
Compare downloads with other packages →
Also on304K r2u218 autocran1.4M conda_forge21.7K c2d4u

Repository

r-lib/xml2 ↗Organization: r-lib
226Stars
85Forks
59Open issues
8Open PRs
21Releases
874Commits
41Commit identities
rxmllibxml2
874 commits · Last activity 2026-06-22 · +1.3% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
76%
Median days to close, 50 most recently updated closed issues
64
Median days to close, 50 most recently updated closed PRs
29

Stars over time

2025-08-27 · 2212026-09-25 · 226
PracticesBeta

17 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/r-lib/xml2 on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (5)
Code of conductContributing guideIssue templatesCODEOWNERSSupport guide
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-06-22 · The repository has a site deploy workflow

pkgdown site last built 2026-06-22

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 2 practices
CRAN release process (2)
cran-comments.mdrevdep/
Lint, format, editor (3)
AirVS CodeRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2026-06-02
    Pull request: opened by its own account
    Commits: 1 by its own account
  • Claude Codefirst seen on or before 2026-06-22
    Named in .Rbuildignore: .claude
    Commits: at least 1 crediting it in the message
From outside contributors
  • Claude Code
    Pull requests: 1 from outside contributors, first on 2026-06-20, 1 from forks
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing xml2 adds 2 packages (2 with compiled code, 1.4 MB of source tarballs). Heaviest: rlang 766 KB, cli 629 KB.

Depends (1)
R >= 3.6.0
Imports (3)
climethodsrlang
LinkingTo (0)
none
Enhances (0)
none

People & History

People (5)
Author, Maintainer since 1.3.7 (2025)
Author · added in 1.2.1
Contributor
Copy of R-project homepage cached as example
Copyright holder, Funder · added in 1.3.6

Previously maintained by Hadley Wickham (1.3.3 to 1.3.6) and Jim Hester (1.1.0 to 1.3.2).

Listed in earlier versions (2)
RStudio
no longer listed · 0.1.0 to 1.3.5
no longer listed · 1.0.0 to 1.2.0
Releases (26)

Pick two releases to compare their code metrics.

Show 23 earlier eventsHide 23 earlier events
  • 1.3.3
    record
    2021-11-30 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 1.3.2
    record
    2020-04-24 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 1.3.1
    record
    2020-04-09 · diff ↗
  • 1.3.0
    record
    2020-04-01 · diff ↗
  • 1.2.5
    record
    2020-03-11 · diff ↗
  • 1.2.4
    record
    2020-03-10 · diff ↗
  • 1.2.2
    record
    2019-08-09 · diff ↗
  • 1.2.1
    record
    2019-07-29 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 1.2.0
    record
    2018-01-24 · diff ↗ ·
    added 3 exports
    download_html, download_xml, xml2_example
  • R
    R 3.4.0 released · 2017-04-21
  • 1.1.1
    record
    2017-01-24 · diff ↗
  • 1.1.0
    record
    2017-01-07 · diff ↗ ·
    added 15 exports
    as_xml_document, write_html, xml_add_parent, xml_cdata, xml_comment, xml_dtd, xml_missing, xml_new_root, xml_serialize, xml_set_attr, xml_set_attrs, xml_set_name, xml_set_text, xml_unserialize, xml_validate
  • 1.0.0
    record
    2016-12-05 · diff ↗ ·
    added 19 exports
    xml_attr<-, xml_attrs<-, xml_name<-, xml_text<-, xml_add_child, xml_add_sibling, xml_child, xml_double, xml_find_chr, xml_find_first, xml_find_lgl, xml_find_num, xml_integer, xml_new_document, xml_ns_strip, xml_remove, xml_replace, xml_root, xml_set_namespace
  • R
    R 3.3.0 released · 2016-05-03
  • 0.1.2
    record
    2015-09-01 · diff ↗
  • 0.1.1
    record
    2015-06-02 · diff ↗ ·
    added 1 export
    xml_length
  • archivedRemoved from CRAN
    2015-05-29
    the non-cross-platform configure script (using bash extensions) was not corrected despite reminders
  • 0.1.0
    record
    2015-04-20
  • R
    R 3.2.0 released · 2015-04-16

Package metadata

First published
2015-04-20
Total releases
26 / 11 yrs
License
MIT + file LICENSE OSI · relicensed from GPL (>= 2) in 1.3.3
Minimum R
≥ 3.6.0
Download size
152 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("xml2")
Ooms, J., Posit Software, PBC, R Foundation, Hester, J., & Wickham, H. (2026). xml2: Parse XML (Version 1.6.0) [Computer software]. https://doi.org/10.32614/CRAN.package.xml2

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for xml2 version 1.6.0 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy