Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: xml validator / parser function or parameter #31

stephlocke opened this issue May 11, 2015 · 5 comments

Feature request: xml validator / parser function or parameter #31

stephlocke opened this issue May 11, 2015 · 5 comments


Copy link

@stephlocke stephlocke commented May 11, 2015

It would be very handy to have a function in this suite that tests whether a fragment is valid XML or HTML. Currently, you can only try performing a conversion and see if it errors or not.

xmlfrag<-"<foo><bar /></foot>"

## Additional function
## Extended read_xml
xmlresult<-read_xml(xmlfrag, check=TRUE) # Output a TRUE or FALSE
Copy link

@cboettig cboettig commented Oct 26, 2015

It would be really nice if validation included schema validation, not just validating the XML. As I see it, the ability to actually check if a document obeys a specified schema is one of the main reasons for providing data in XML in the first place and not just in JSON (even though I suppose schemas are beginning to pop up there to).

Thanks for xml2 btw, avoiding segfaults is a beautiful thing! right now I guess XML is still our only option for serializing and validating though...

Copy link

@hadley hadley commented May 4, 2016

I'd consider a pull request to implement this; otherwise it's unlikely to get high-enough on my priority list to implement.

Copy link

@jeroen jeroen commented Dec 14, 2016

Added xml_validate in a8ca948 to validate xml 1.0 schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants