在使用R的rvest包通过xpath获取节点属性时遇到Error in xml_apply(x, XML::xmlValue, ..., .type = character(1)) : Unknown input of class: XMLAttributeValue的报错。不知道如何把XMLAttributeValue转化为xmlValue格式
html的片段如下<a id=hello </a>,想获取id对应的值hello,第二行代码可以获取到id的值为hello,但是如何把hello转化为text()或其他格式?