Skip to content
Prev 155280 / 398506 Next

XML - get node by name

Thanks a lot to Gabor and Duncan!

I didn't know that XPath is a standard. I'll give it a deeper look to better 
understand it.

Oh, I guess I understand a bit more

xpathApply(doc, "//val", function(n) xmlValue(n))

would search globally for all nodes named "val" and return its values :-)
So that's excactly what I was looking for. Not caring about the exact location 
of a node.
I think, in my case it should be okay, to parse for nodes just by their names.

Thanks again!

@ Ajay: Sorry, but I was looking for a solution with R
@ Dirk: I already used the XML package but didn't know the possibilities to 
access data as I was used to.



Antje schrieb: