# classes/phing/tasks/ext/XmlLintTask.php

A XML lint task. Checking syntax of one or more XML files against an XML Schema using the DOM extension.

author
  Knut Urdalen
package
  phing.tasks.ext
version
  $Id: XmlLintTask.php 1001 2010-11-24 10:40:05Z mrook $

## \XmlLintTask
jump to top

A XML lint task. Checking syntax of one or more XML files against an XML Schema using the DOM extension.

Use {@link Project#createTask} to register a new Task.

Extends from
  \Task
author
  Knut Urdalen
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.ext
version
  $Id: XmlLintTask.php 1001 2010-11-24 10:40:05Z mrook $

### Properties

`$file= ''`
Details

Type

`$filesets= 'array'`
Default value `array` Details

Type

`$haltonfailure= 'true'`
Default value `true` Details

Type

`$schema= ''`
Details

Type

### Methods

`createFileSet( ) : \FileSet`
Nested creator, creates a FileSet for this task
Returns

Type | Description
--- | ---
\FileSet |

`errorHandler( int $level, string $message, string $file, int $line, $context ) :`
Local error handler to catch validation errors and log them through Phing
Parameters

Name | Type | Description
--- | --- | ---
$level | int |
$message | string |
$file | string |
$line | int |
$context |  |

`lint( string $file ) : void`
Performs validation
Parameters

Name | Type | Description
--- | --- | ---
$file | string |

`logError( $message ) :`
Parameters

Name | Type | Description
--- | --- | ---
$message |  |

`main( ) :`
Execute lint check against PhingFile or a FileSet
`setFile( \PhingFile $file ) :`
File to be performed syntax check on
Parameters

Name | Type | Description
--- | --- | ---
$file | \PhingFile |

`setHaltonfailure( bool $haltonfailure ) :`
Sets the haltonfailure attribute
Parameters

Name | Type | Description
--- | --- | ---
$haltonfailure | bool |

`setSchema( \PhingFile $schema ) :`
XML Schema Description file to validate against
Parameters

Name | Type | Description
--- | --- | ---
$schema | \PhingFile |

Documentation was generated by DocBlox 0.13.1.