r-xml2

Bindings to libxml2

https://github.com/r-lib/xml2

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 37 committers (5.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.1%) to scientific vocabulary

Keywords

libxml2 r xml

Keywords from Contributors

tidy-data package-creation setup data-manipulation grammar unit-testing devtools excel documentation-tool curl
Last synced: 6 months ago · JSON representation

Repository

Bindings to libxml2

Basic Info
  • Host: GitHub
  • Owner: r-lib
  • License: other
  • Language: R
  • Default Branch: main
  • Homepage: https://xml2.r-lib.org/
  • Size: 14.2 MB
Statistics
  • Stars: 224
  • Watchers: 21
  • Forks: 83
  • Open Issues: 62
  • Releases: 20
Topics
libxml2 r xml
Created about 11 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codeowners Support

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# xml2


[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/xml2)](https://cran.r-project.org/package=xml2)
[![Codecov test coverage](https://codecov.io/gh/r-lib/xml2/branch/master/graph/badge.svg)](https://app.codecov.io/gh/r-lib/xml2?branch=main)
[![R build status](https://github.com/r-lib/xml2/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/xml2/actions)
[![R-CMD-check](https://github.com/r-lib/xml2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/xml2/actions/workflows/R-CMD-check.yaml)


The xml2 package is a binding to [libxml2](http://xmlsoft.org), making it easy to work with HTML and XML from R. The API is somewhat inspired by [jQuery](https://jquery.com).

## Installation

You can install xml2 from CRAN, 

```r
install.packages("xml2")
```

or you can install the development version from github, using `pak`:

```r
# install.packages("pak")
pak::pak("r-lib/xml2")
```

## Usage

```r
library(xml2)
x <- read_xml("  text   ")
x

xml_name(x)
xml_children(x)
xml_text(x)
xml_find_all(x, ".//baz")

h <- read_html("

Hi !") h xml_name(h) xml_text(h) ``` There are three key classes: * `xml_node`: a single node in a document. * `xml_doc`: the complete document. Acting on a document is usually the same as acting on the root node of the document. * `xml_nodeset`: a __set__ of nodes within the document. Operations on `xml_nodeset`s are vectorised, apply the operation over each node in the set. ## Compared to the XML package xml2 has similar goals to the XML package. The main differences are: * xml2 takes care of memory management for you. It will automatically free the memory used by an XML document as soon as the last reference to it goes away. * xml2 has a very simple class hierarchy so you don't need to think about exactly what type of object you have, xml2 will just do the right thing. * More convenient handling of namespaces in Xpath expressions - see `xml_ns()` and `xml_ns_strip()` to get started. ## Code of Conduct Please note that the xml2 project is released with a [Contributor Code of Conduct](https://xml2.r-lib.org/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

Owner

  • Name: R infrastructure
  • Login: r-lib
  • Kind: organization

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 15
  • Watch event: 9
  • Delete event: 1
  • Issue comment event: 20
  • Push event: 86
  • Pull request event: 13
  • Fork event: 4
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 15
  • Watch event: 9
  • Delete event: 1
  • Issue comment event: 20
  • Push event: 86
  • Pull request event: 13
  • Fork event: 4

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 799
  • Total Committers: 37
  • Avg Commits per committer: 21.595
  • Development Distribution Score (DDS): 0.429
Past Year
  • Commits: 31
  • Committers: 5
  • Avg Commits per committer: 6.2
  • Development Distribution Score (DDS): 0.226
Top Committers
Name Email Commits
Jim Hester j****r@g****m 456
hadley h****m@g****m 177
Jeroen Ooms j****s@g****m 95
Michael Chirico m****4@g****m 8
Simon Potter s****n@s****z 7
Peter Foley p****r@a****v 6
Mara Averick m****k@g****m 6
Maximilian Girlich m****h@m****m 4
olivroy 5****y 4
Maëlle Salmon m****n@y****e 3
Jennifer (Jenny) Bryan j****y@s****a 2
Daniel Nüst d****t@u****e 2
Jenny Bryan j****n@g****m 2
Gabor Csardi c****r@g****m 2
Christian Heckendorf h****c@g****m 2
Henrik Bengtsson hb@a****g 2
Steven Pav s****n@g****m 1
Bob Rudis b****b@r****s 1
William 4****r 1
Steven Pav s****f@g****m 1
Stefan Milton Bache s****n@s****k 1
Rich FitzJohn r****n@g****m 1
Patrick Hausmann p****n@c****e 1
Nicolas Coutin n****n 1
Michael Quinn m****n@g****m 1
Maximilian Mücke m****n@g****m 1
Matt Nield 6****d 1
Lucio Queiroz l****q 1
Kun Ren r****n@o****m 1
Kevin Ushey k****y@g****m 1
and 7 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 126
  • Total pull requests: 50
  • Average time to close issues: 5 months
  • Average time to close pull requests: 4 months
  • Total issue authors: 86
  • Total pull request authors: 20
  • Average comments per issue: 2.15
  • Average comments per pull request: 0.82
  • Merged pull requests: 33
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 10
  • Pull requests: 9
  • Average time to close issues: 6 days
  • Average time to close pull requests: 3 months
  • Issue authors: 10
  • Pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.11
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • hadley (21)
  • MichaelChirico (11)
  • jimhester (2)
  • BillDunlap (2)
  • ramiromagno (2)
  • kevinushey (2)
  • discoleo (2)
  • jmendys (2)
  • lbocken (2)
  • cole-johanson (2)
  • mgirlich (2)
  • patr1ckm (1)
  • ostroganov (1)
  • andzandz11 (1)
  • cryptic0 (1)
Pull Request Authors
  • MichaelChirico (14)
  • hadley (6)
  • mgirlich (5)
  • olivroy (4)
  • gaborcsardi (4)
  • maelle (3)
  • jeroen (2)
  • m-muecke (2)
  • randef1ned (1)
  • matthewjnield (1)
  • alexverse (1)
  • KNnut (1)
  • wkumler (1)
  • jakejh (1)
  • billdenney (1)
Top Labels
Issue Labels
feature (18) bug (14) reprex (10) documentation (6) upkeep (5) xpath :walking_man: (2) namespace :name_badge: (1) tidy-dev-day :nerd_face: (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads: unknown
  • Total dependent packages: 89
    (may contain duplicates)
  • Total dependent repositories: 51
    (may contain duplicates)
  • Total versions: 30
conda-forge.org: r-xml2
  • Versions: 10
  • Dependent Packages: 89
  • Dependent Repositories: 51
Rankings
Dependent packages count: 0.9%
Average: 2.9%
Dependent repos count: 5.0%
Last synced: 6 months ago
proxy.golang.org: github.com/r-lib/xml2
  • Versions: 20
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.7%
Dependent repos count: 5.9%
Last synced: 6 months ago