xml - getNodeSet returns zero output -
i've got xml accessible this link. i'm trying convert them dataset in r.
i use xml package this. first,
d <- xmlparse("v1.xml") ## name of downloaded file, tried link above
and then
t <- getnodeset(d,'//itemid')
to apply result xmltodataframe
function. getnodeset
returns no output. tried different xmlpaths
, full path
("//findcompleteditemsresponse/searchresult/item/itemid")
but doesn't work.
please, advice me on whether use wrong syntax or there problems xml file.
it issue namespaces. use
getnodeset(d, "//*[local-name() = 'itemid']") or getnodeset(d, "//x:itemid", namespaces = c(x = "http://www.ebay.com/marketplace/search/v1/services"))
Comments
Post a Comment