How to replace the text inside an XML element in R?

Ownetstause

New Member
I have one input xml file. cat sample.xml\[code\]<Text> <p>ABC </p></Text>\[/code\]R script \[code\]library(XML)doc = xmlTreeParse("sample.xml", useInternal = TRUE)top<-xmlRoot(doc)sub("<","<",top[[1]])\[/code\]How can i fix above pblm?Error Message: Error in as.vector(x, "character") : cannot coerce type 'externalptr' to vector of type 'character'
 
Back
Top