Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xml_validate

Validate XML schema


Description

Validate an XML document against an XML 1.0 schema.

Usage

xml_validate(x, schema)

Arguments

x

A document, node, or node set.

schema

an XML document containing the schema

Value

TRUE or FALSE

Examples

# Example from https://msdn.microsoft.com/en-us/library/ms256129(v=vs.110).aspx
doc <- read_xml(system.file("extdata/order-doc.xml", package = "xml2"))
schema <- read_xml(system.file("extdata/order-schema.xml", package = "xml2"))
xml_validate(doc, schema)

xml2

Parse XML

v1.3.2
GPL (>= 2)
Authors
Hadley Wickham [aut], Jim Hester [aut, cre], Jeroen Ooms [aut], RStudio [cph], R Foundation [ctb] (Copy of R-project homepage cached as example)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.