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
I discovered an issue where an empty tag (see below) can cause toRelational() to fail, see reproducible example below:
# this xml fragment has an empty title tag (nested under relatedItem)doc_err<-'<xml> <titleInfo lang="eng"><title>CreativeBot</title></titleInfo> <relatedItem type="host"> <titleInfo><title></title></titleInfo> </relatedItem></xml>'# this statement gives an errordoc_err|>xml2relational::toRelational()
# Error in `vec_assign()`:# ! Can't convert `replace` <character> to match type of `data` <logical>.# Run `rlang::last_error()` to see where the error occurred.# this xml fragment is equal to the previous apart except for using a space instead inside the title tag (nested under relatedItem)doc_ok<-'<xml> <titleInfo lang="eng"><title>CreativeBot</title></titleInfo> <relatedItem type="host"> <titleInfo><title> </title></titleInfo> </relatedItem></xml>'# this statement works okdoc_ok|>xml2relational::toRelational()
Thanks for this nice package!
I discovered an issue where an empty tag (see below) can cause toRelational() to fail, see reproducible example below:
I think https://github.com/jsugarelli/xml2relational/blob/master/R/xml2relational.r#L105 is what is triggering the error.
The text was updated successfully, but these errors were encountered: