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
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, '<
2 matches
Mail list logo