You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't seem to be possible to set the value of an attribute to the empty string. This is valid XML and there's no problem parsing such an attribute:
library(xml2) # v.1.1.1# readingx<- read_xml("<a foo='' />")
n<- xml_find_first(x, "/a")
xml_attrs(n) # named character vector of length 1# writing
xml_set_attr(n, "foo", "bar")
xml_attrs(n) # named character vector of length 1
xml_set_attr(n, "foo", "")
xml_attrs(n) # named character vector of length 0
Is there another way to set the value of the attribute to the empty string?
The text was updated successfully, but these errors were encountered:
It doesn't seem to be possible to set the value of an attribute to the empty string. This is valid XML and there's no problem parsing such an attribute:
Is there another way to set the value of the attribute to the empty string?
The text was updated successfully, but these errors were encountered: