[R] How to parse XML

From: Bos, Roger <roger.bos_at_us.rothschild.com>
Date: Fri, 02 May 2008 11:08:35 -0400

I would like to learn how to parse a mixed text/xml document I downloaded from the sec.gov website (see example below). I would like to parse this to get the value for each xml tag and then access it within R, but I don't know much about xml so I don't even know where to start debugging the errors I am getting in this example code. Can anyone help me get started?

Thanks, Roger

ftp <-
"ftp://anonymous:test@ftp.sec.gov/edgar/data/1317493/0001144204-08-02122 1.txt"
download.file(url=ftp, destfile="test2.txt") xmlTreeParse("test2.txt")

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 02 May 2008 - 16:48:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 02 May 2008 - 17:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive