Re: [R] another XML package question

2008-09-08 Thread Antje
Duncan Temple Lang schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Antje wrote: Hi Duncan, thanks a lot for your explanations. I tried the following now to understand a bit more: data <- getNodeSet(doc, "//Data") xmlName(data[[1]]) xmlName(xmlRoot(data[[1]])) xpathApply(data[[1]], "

Re: [R] another XML package question

2008-09-08 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Antje wrote: > Hi Duncan, > > thanks a lot for your explanations. > > I tried the following now to understand a bit more: > > data <- getNodeSet(doc, "//Data") > xmlName(data[[1]]) > xmlName(xmlRoot(data[[1]])) > xpathApply(data[[1]], "./*", xmlNa

Re: [R] another XML package question

2008-09-08 Thread Antje
Hi Duncan, thanks a lot for your explanations. I tried the following now to understand a bit more: data <- getNodeSet(doc, "//Data") xmlName(data[[1]]) xmlName(xmlRoot(data[[1]])) xpathApply(data[[1]], "./*", xmlName) Is it right that using "data" in the xpathApply() somehow sets the current n

Re: [R] another XML package question

2008-09-08 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Antje wrote: > Hi there, > > does anybody know how to return the xmlPath from a node? > For example, at several location in the xml file, I have nodes with the > same name and I'd like to process only the nodes from a certain path. > > Any idea? A