If I have an XMLNode object that looks like this:
<foo>
<a>1</a>
<b>
<c>1</c>
<d>2</d>
</b>
</foo>
(available as dput dump: https://gist.github.com/4273470)
without knowing the nestedness of the "c" node, how can I change its value from "1" to "2"? I have been playing with the XML package, but it is not terribly clear - most examples appear to deal with extracting rather than updating information.
I have also tried using xmlToList
, but then I don't know how to identify / update a node on a list of arbitrary depth either.