GetXMLNodes: Gets all XML node text

Description Usage Arguments Value Examples

View source: R/xml.R

Description

Parses through all XML end nodes and returns the text of those nodes in a tibble.

Usage

1
GetXMLNodes(x, nodepath = "*")

Arguments

x

XML document.

nodepath

Xpath to node for which text has to be collected. Defaults to * that will collect text of all nodes.

Value

Returns xpath to a node, node name and text value in a tibble.

Examples

1
2
3
4
GetXMLNodes(xml2::read_xml("https://www.w3schools.com/xml/simple.xml")) %>%
  View()
GetXMLNodes(xml2::read_xml("https://www.w3schools.com/xml/simple.xml"), "calories") %>%
  View()

neemtreeparrot/tidbitr documentation built on May 23, 2019, 1:31 p.m.