File: xpathPointer.xml

package info (click to toggle)
r-cran-xml 3.98-1.5-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 9,464 kB
  • ctags: 636
  • sloc: xml: 79,579; ansic: 6,518; asm: 644; sh: 16; makefile: 1
file content (8 lines) | stat: -rw-r--r-- 222 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
fl = system.file("exampleData", "mtcars.xml", package="XML")
xml <- xmlTreeParse(fl, useInternal=TRUE)

node = xpathApply(xml, "/*/*")[[1]]
x = xpathApply(node, "/*/*")[[1]]


sapply(xpathApply(node, "//*[@id]"), xmlName)