omegahat / XML

The XML package for R
Other
20 stars 11 forks source link

Consider exporting XML:::addXMLAttributes to the NAMESPACE? #2

Open cboettig opened 10 years ago

cboettig commented 10 years ago

@omegahat Is there a good reason addXMLAttributes is not exported at present? For instance, I've found it useful in our EML repo: https://github.com/ropensci/EML/blob/master/R/emlToS4.R#L13

Is there a better way I should be doing this?

(Since calling unexported functions results in a R CMD check warning of course)

duncantl commented 6 years ago

xmlAttrs(node) = c(newAttr = "bob", changeExistingAttr = "jane") is perhaps the simplest. We can easily export addXMLAttributes(), but probably a bit late now :-)