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.
I'm working on a script to extract data from 33k xml files, so I'd like to suppress all warnings and messages. But the warning-like xmlXPathEval: evaluation failed that shows up on certain kinds of errors (an undefined namespace, in the MWE) doesn't seem to be either a message or a warning. What is this, and how can I suppress it?
MWE:
library(xml2)
file = '2-s2.0-0015762931.xml'
xml = read_xml(file)
out = xml_find_first(xml, '//dc:identifier')
suppressWarnings(out <- xml_find_first(xml, '//dc:identifier'))
suppressMessages(out <- xml_find_first(xml, '//dc:identifier'))
if (require(purrr)) {
out = quietly(xml_find_first)(xml, '//dc:identifier')
}
The message is coming from the libxml2 library directly, which is why you are unfortunately not able to suppress it yourself. It may be possible to work around this in the future, so please leave this issue open.
I'd also like to know if it's possible to suppress these messages/errors, some users of a package of mine seem to be confused as to whether the package is working correctly when they see these messages. (Issue here)
I'm working on a script to extract data from 33k xml files, so I'd like to suppress all warnings and messages. But the warning-like
xmlXPathEval: evaluation failed
that shows up on certain kinds of errors (an undefined namespace, in the MWE) doesn't seem to be either a message or a warning. What is this, and how can I suppress it?MWE:
2-s2.0-0015762931.xml.zip
The text was updated successfully, but these errors were encountered: