[R] How to parse XML
Bos, Roger
roger.bos at us.rothschild.com
Fri May 2 17:08:35 CEST 2008
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")
********************************************************************** *
This message is for the named person's use only. It may
contain confidential, proprietary or legally privileged
information. No right to confidential or privileged treatment
of this message is waived or lost by any error in
transmission. If you have received this message in error,
please immediately notify the sender by e-mail,
delete the message and all copies from your system and destroy
any hard copies. You must not, directly or indirectly, use,
disclose, distribute, print or copy any part of this message
if you are not the intended recipient.
More information about the R-help
mailing list