/usr/lib/R/site-library/XML/examples/reorder.xml is in r-cran-xml 3.98-1.10-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <doc xmlns:r="http://www.r-project.org">
<a>
<b id="1"/>
<b id="2"/>
<c/>
<d/>
<b id="3"/>
<b id="4"/>
<c/>
</a>
<r:code>
doc = xmlInternalTreeParse("examples/reorder.xml")
bs = getNodeSet(doc, "//b")
length(bs)
# [1] 4
xmlName(xmlRoot(doc)[[1]])
# [1] "a"
a = xmlRoot(doc)[[1]]
addChildren(a, kids = bs)
saveXML(doc)
addChildren(a, kids = bs, at = 0)
</r:code>
</doc>
|