require(XML)
firefox <- firefoxClass$new()
firefox$get("http://lluisramon.github.io/relenium/toyPageExample.html")
doc <- htmlParse(firefox$getPageSource())
rootNode <- xmlRoot(doc)
selectNode <- getNodeSet(rootNode, "//select")[[1]]
xmlName(selectNode)
xmlSize(selectNode)
xmlChildren(selectNode)
xmlName(xmlParent(selectNode))
xmlAttrs(selectNode)
xmlGetAttr(selectNode, "multiple")
names(selectNode)
selectNode[[1]]
selectNode['option']
selectNode[1:2]
xmlApply(selectNode, xmlValue)
xmlSApply(selectNode, xmlValue)
xpathSApply(rootNode, '//option', xmlValue)
/
#