【发布时间】:2021-01-12 11:02:15
【问题描述】:
如何在 R 中打印/显示更长的 XML 节点结果?当我尝试打印它们时,它们只是以 '..." 结尾
library(rvest)
html <- read_html('https://en.wikipedia.org/wiki/COVID-19_pandemic')
# Works fine as the result is short
html_node(html, xpath = '//*[@id="firstHeading"]')
# Does not print the whole result, ends with'...'
long_path <- html_node(html, xpath = '//*[@id="toc"]/ul')
long_path
【问题讨论】: