I tried the following:
我尝试了以下方法:
library(XML)
top = newXMLNode("A")
newXMLNode("b", attrs=c(x=1,y='abc'),parent=top)
newXMLNode("c", "With some text", parent=top)
top
xpathSApply(top,'//A/b/@x')
library(XMI tried the following:
我尝试了以下方法:
library(XML)
top = newXMLNode("A")
newXMLNode("b", attrs=c(x=1,y='abc'),parent=top)
newXMLNode("c", "With some text", parent=top)
top
xpathSApply(top,'//A/b/@x')
library(XM