index4attribute <-
function(node, attribute) {
for (i in seq(length = length(node)) ) {
childNode <- node[[i]]
nodeAttributes <- xmlAttrs(childNode)
if (length(grep(attribute, nodeAttributes))>0) {
return(i)
}
}
return(NULL)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.