All Projects → r-lib → Xml2

r-lib / Xml2

Licence: other
Bindings to libxml2

Programming Languages

c
50402 projects - #5 most used programming language
r
7636 projects

Labels

Projects that are alternatives of or similar to Xml2

Roxmltree
Represent an XML 1.0 document as a read-only tree.
Stars: ✭ 168 (-8.7%)
Mutual labels:  xml
Node Js2xmlparser
Popular Node.js module for parsing JavaScript objects into XML
Stars: ✭ 171 (-7.07%)
Mutual labels:  xml
Xdxf makedict
XDXF — a dictionary format, that stores word definitions that are free from representation
Stars: ✭ 177 (-3.8%)
Mutual labels:  xml
Sitemap Generator Crawler
Script that generates a sitemap by crawling a given URL
Stars: ✭ 169 (-8.15%)
Mutual labels:  xml
Goxml2json
XML to JSON converter written in Go (no schema, no structs)
Stars: ✭ 170 (-7.61%)
Mutual labels:  xml
Otpview
A custom view to enter otp/pin of different sizes used usually in cases of authentication.
Stars: ✭ 172 (-6.52%)
Mutual labels:  xml
Acl
Server framework and network components written by C/C++ for Linux, Mac, FreeBSD, Solaris(x86), Windows, Android, IOS
Stars: ✭ 2,113 (+1048.37%)
Mutual labels:  xml
Bancosbrasileiros
Lista de bancos brasileiros | Brazilian banks list
Stars: ✭ 178 (-3.26%)
Mutual labels:  xml
Xbmc
Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows.
Stars: ✭ 13,175 (+7060.33%)
Mutual labels:  xml
Ksprefs
🚀⚡ Kotlin SharedPreferences wrapper & cryptographic preferences android library.
Stars: ✭ 176 (-4.35%)
Mutual labels:  xml
Amplesdk
Ample SDK - JavaScript UI Framework
Stars: ✭ 169 (-8.15%)
Mutual labels:  xml
Exportsheetdata
Add-on for Google Sheets that allows sheets to be exported as JSON or XML.
Stars: ✭ 170 (-7.61%)
Mutual labels:  xml
Jquery Xpath
jQuery XPath plugin (with full XPath 2.0 language support)
Stars: ✭ 173 (-5.98%)
Mutual labels:  xml
Pluxml
PluXml, Moteur de Blog et CMS à l'XML sans base de données
Stars: ✭ 168 (-8.7%)
Mutual labels:  xml
Cidlib
The CIDLib general purpose C++ development environment
Stars: ✭ 179 (-2.72%)
Mutual labels:  xml
Preact Markup
⚡️ Render HTML5 as VDOM, with Components as Custom Elements!
Stars: ✭ 167 (-9.24%)
Mutual labels:  xml
Cve Check Tool
Original Automated CVE Checking Tool
Stars: ✭ 172 (-6.52%)
Mutual labels:  xml
Thymeleaf
Thymeleaf is a modern server-side Java template engine for both web and standalone environments.
Stars: ✭ 2,251 (+1123.37%)
Mutual labels:  xml
Rawspeed
fast raw decoding library
Stars: ✭ 179 (-2.72%)
Mutual labels:  xml
Qxorm
QxOrm library - C++ Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository
Stars: ✭ 176 (-4.35%)
Mutual labels:  xml

xml2

R build status Coverage Status

The xml2 package is a binding to libxml2, making it easy to work with HTML and XML from R. The API is somewhat inspired by jQuery.

Installation

You can install xml2 from CRAN,

install.packages("xml2")

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

# install.packages("devtools")
devtools::install_github("r-lib/xml2")

Usage

library("xml2")
x <- read_xml("<foo> <bar> text <baz/> </bar> </foo>")
x

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

h <- read_html("<html><p>Hi <b>!")
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_nodesets 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 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. By contributing to this project, you agree to abide by its terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].