xml2 Questions

1

Solved

My question is similar to this one, but the latter did not receive an answer I can work with. I am scraping thousands of urls with xml2::read_html. This works fine. But when I try and parse the res...
Tailrace asked 22/5, 2019 at 16:59

2

I'm using R in a commercial environment where external connectivity all goes via a web proxy, so we need to specify the proxy server address and ensure we connect to it with Windows authentication....
Swordsman asked 26/10, 2018 at 15:24

1

Solved

Previously posted a related stackoverflow question about scraping a table on the leaderboard page of the PGA's website on this page. To summarize that post, the leaderboard table is difficult to sc...
Crenate asked 16/4, 2021 at 0:1

4

Solved

Objects can be saved and read like so # Save as file saveRDS(iris, "mydata.RDS") # Read back in readRDS("mydata.RDS") But this doesn't seem to work for objects made with xml2::read_html() Ex...
Alfons asked 3/9, 2019 at 3:8

2

Solved

The PGA tour's website has a leaderboard page page and I am trying to scrape the main table on the website for a project. library(dplyr) leaderboard_table <- xml2::read_html('https://www.pgatour...
Flashover asked 5/2, 2021 at 1:35

4

Solved

Question My question, explained below, is: How can R be used to read a string that includes HTML emoji codes like ��? I'd like to: (1) represent the emoji symbol (e.g., as ...
Luminescence asked 7/1, 2018 at 23:47

1

Solved

I am using the xml2 package in R to access xml data, and found that it behaves different on different xml_documents. On this pet example library(xml2) doc <- read_xml( "<MEMBERS> <CU...
Cathleencathlene asked 17/4, 2019 at 12:7

1

Solved

I'd like to do exactly what xml2::xml_text() or rvest::html_text() do but preserve the tags instead of replacing e.g. <br> with \n. The objective is to e.g. scrape a web page, extract the nod...
Jargonize asked 14/9, 2018 at 19:17

1

Solved

The xml2 package allows users to create XML documents. I'm trying to create a document using the pipe operator %>% to add various combinations of child and sibling nodes. I cannot figure out how...
Spotter asked 8/8, 2018 at 18:47

4

I am trying to simply replicate the example of rvest::html_nodes(), yet encounter an error: library(rvest) ateam <- read_html("http://www.boxofficemojo.com/movies/?id=ateam.htm") html_nodes(ate...
Discursive asked 29/11, 2016 at 19:15

4

Solved

Consider the following XML example library(xml2) myxml <- read_xml(' <data> <obs ID="a"> <name> John </name> <hobby> tennis </hobby> <hobby> golf ...
Deserted asked 28/5, 2017 at 18:3

1

Solved

I use R and it's package xml2 to parse an html document. I extracted a piece of html file, which looks like this: text <- ('<div> <p><span class="number">1</span>First&a...
Endoscope asked 15/3, 2017 at 1:36

2

I am using the xml2 package to read a huge XML file into memory and the command fails with the following error: Error: Char 0x0 out of allowed range [9] My code looks like the following: libr...
Washwoman asked 2/2, 2016 at 14:4

1

Solved

I have a bunch of XML files and an R script that reads their content into a data frame. However, I got now files which I wanted to parse as usual, but there is something in their namespace definiti...
Manatee asked 20/3, 2015 at 15:27
1

© 2022 - 2025 — McMap. All rights reserved.