-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
reprexneeds a minimal reproducible exampleneeds a minimal reproducible example
Description
Example:
xml_find_num(xml, "/some/path/that/does/not/exist")
Should check if it is a request for NUMBER:
if (result_ == NULL) {
// should first check if the request is for NUMBER and return a NA;
SEXP ret = PROTECT(Rf_allocVector(VECSXP, 0));
Rf_setAttrib(ret, R_ClassSymbol, Rf_mkString("xml_missing"));
UNPROTECT(1);
return ret;
}
For missing nodes:
- either return NA;
- or add argument to function: xml_find_num(xml, xpath, defaultVal=NA);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
reprexneeds a minimal reproducible exampleneeds a minimal reproducible example