[R] RSXML - Parsing XML Documents on Internet

larsenmtl@comcast.net larsenmtl at comcast.net
Wed Sep 29 23:12:37 CEST 2004

R Users -

I asked about this a few months ago and never did quite figure it out, so with 
more information, allow me to try again.

If I use the following code:

xmlTreeParse("http://home.comcast.net/~larsenmtl/xmlTestDoc.xml", isURL = TRUE)
I receive this error:
Error in xmlTreeParse("http://home.comcast.net/~larsenmtl/xmlTestDoc.xml"",  : 
        error in creating parser for 

Now I know that xmlTreeParse uses the libxml facilities for downloading and 
parsing off the web.   Along with one of our network people, I did some packet 
sniffing and it looks like libxml doesn't go through our proxy server (it tries 
to directly connect to the above URL), which is the reason for the error.  Is 
there anyway to force it through the proxy?  Am I missing some setting or 
option?  If I download the xml file and parse it locally it works without error.

Please Note that the URL is valid and I can open it in my browser.  Also note 
that I must start R with the --internet2 option so it'll use our proxy server.  

Windows 2000
RSXML 0.97-0
libxml2-2.4.13 distribution for Windows

I also tried this on a Mandrake 9.2 box with R1.9.1, XML0.95-6, and libxml2 
2.6.13.  Results were the same but with the additional error message:
I/O warning: falied to load external entity "http://...."


Mark Larsen

More information about the R-help mailing list