validate: Validate XML files.

Description Usage Arguments Examples

Description

A single file, or all files in directory x are checked for validity using the command line tool xmllint. If targetDir is specified, the option '–recover' will be used, and repaired XML files are written to targetDir. If the param dtd provides a filename with a DTD, files are checked against the respective DTD.

Usage

1
validate(x, targetDir = NULL, dtd = NULL, ...)

Arguments

x

character vector, a filename, or a directory path

targetDir

the target directory

dtd

filename of a DTD

...

arguments that will be passed into dirApply

Examples

1
2
3
4
5
## Not run: 
  validate("/Users/blaette/Lab/repos/plprnwhtm/html/2015-02-23/utf8", dtd=NULL)
  for i in $(ls); do xmllint --recover $i -o ../xmlValidated/$i; done

## End(Not run)

PolMine/ctk documentation built on May 8, 2019, 3:20 a.m.