gulp-xml-validator
Version:
Gulp plugin to validate XML
45 lines (29 loc) • 1.29 kB
Markdown
# gulp-xml-validator
> Gulp plugin to validate XML.
[](https://github.com/idleberg/gulp-xml-validator/blob/main/README.md)
[](https://github.com/idleberg/gulp-xml-validator/releases)
[](https://github.com/idleberg/gulp-xml-validator/actions)
## Installation
```sh
$ npm install gulp-xml-validator --save-dev
```
## Usage
```js
// Gulpfile.mjs
import gulp from 'gulp';
import { xmlValidator } from 'gulp-xml-validator';
gulp.task('lint', done => {
gulp.src('**/*.xml')
.pipe(xmlValidator());
done();
});
```
> [ ]
> This plugin is now pure ESM. [Read how to migrate your `Gulpfile`](https://gist.github.com/noraj/007a943dc781dc8dd3198a29205bae04). Alternatively, you can continue using an *unsupported* 1.x version.
### Options
#### `options.mimeType`
Type: `string`
Default: `"text/xml"`
Allows modifying the MIME type passed to `DOMParser().parseFromString()`.
## License
This work is licensed under [The MIT License](https://opensource.org/licenses/MIT).