Sorry about that - got dropped from my attempts yesterday (see the first
example below, that has the "useInternalNodes=TRUE") ...
Thanks again, Joh
Duncan Temple Lang wrote:
> Johannes Graumann wrote:
>> Thanks!
>> but:
>> > library(XML)
>> > xmlDoc <- xmlTreeParse("http://www.unimod.org/xml/u
Johannes Graumann wrote:
> Thanks!
> but:
> > library(XML)
> > xmlDoc <- xmlTreeParse("http://www.unimod.org/xml/unimod_tables.xml";)
You need to xmlParse() or xmlTreeParse(url, useInternalNodes = TRUE)
(which are equivalent) in order to be able to use getNodeSet().
The error you are getting is b
Thanks!
but:
> library(XML)
> xmlDoc <- xmlTreeParse("http://www.unimod.org/xml/unimod_tables.xml";)
> getNodeSet(xmlDoc,"//x:modifications_row", "x")
Error in function (classes, fdef, mtable) :
unable to find an inherited method for function "saveXML", for signature
"XMLDocument"
?
Thanks,
Hi Johannes
This is a common issue. The document has a default XML namespace, e.g.
the root node is defined as
http://www.unimod.org/xmlns/schema/unimod_tables_1";...>
.
So you need to specify which namespace to match in the XPath expression
in getNodeSet(). The XML package provide
Hi,
Why is the following retuning a nodset of length 0:
> library(XML)
> test <- xmlTreeParse(
> "http://www.unimod.org/xml/unimod_tables.xml",useInternalNodes=TRUE)
> getNodeSet(test,"//modifications_row")
Thanks for any hint.
Joh
__
R-help@r-projec
5 matches
Mail list logo