Skip to content
Back to formatted view

Raw Message

Message-ID: <1302114737.30266.9.camel@arc1-r700>
Date: 2011-04-06T18:32:17Z
From: Adam Cooper
Subject: Treatment of xml-stylesheet processing instructions in XML module

Hello again,
Another stumble here that is defeating me.

I try:
a<-readLines(url("http://feeds.feedburner.com/grokin"))
t<-XML::xmlTreeParse(a, ignoreBlanks=TRUE, replaceEntities=FALSE,
asText=TRUE)
elem<- XML::getNodeSet(XML::xmlRoot(t),"/rss/channel/item")[[1]]

And I get:
Start tag expected, '<' not found
Error: 1: Start tag expected, '<' not found

When I modify the second line in "a" to remove the following (just
leaving the <rss> tag with its attributes), I do not get the error.
I removed:
<?xml-stylesheet type=\"text/xsl\" media=\"screen\" href=
\"/~d/styles/rss2full.xsl\"?><?xml-stylesheet type=\"text/css\" media=
\"screen\" href=\"http://feeds.feedburner.com/~d/styles/itemcontent.css
\"?>

I would have expected the PI to be totally ignored by default.
Have I missed something??

Thanks in advance...

Cheers, Adam