Re: [R] Treatment of xml-stylesheet processing instructions in XML module

2011-04-06 Thread Duncan Temple Lang
Hi Adam To use XPath and getNodeSet on an XML document, you will want to use xmlParse() and not xmlTreeParse() to parse the XML content. So t = xmlParse(I(a)) # or asText = TRUE elem = getNodeSet(t, "/rss/channel/item")[[1]] works fine. You don't need to specify the root node, but rather the do

[R] Treatment of xml-stylesheet processing instructions in XML module

2011-04-06 Thread Adam Cooper
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, '<