# <validatexml>

Validates a set of XML files based on a set of XML Schemas (XSD).

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False
unless | bool | Opposite of `if`. If false then the task will be executed; otherwise, skipped. The default is false. | False
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False

### Nested Elements:

#### <files>

The XML files that must be validated.

#### </files>

#### <schemas>

The XML Schemas (XSD) to use for validation.

##### <schema>

Represents the schema collection element.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
source | string | Location of this schema. Could be a local file path or an HTTP URL. | True
namespace | string | Namespace URI associated with this schema. If not present, it is assumed that the schema's targetNamespace value is to be used. | False

##### </schema>

#### </schemas>

### Examples

-     <validatexml>
          <schemas>
              <schema source="rcf-schema.xsd" />
              <schema namespace="urn:schemas-company-com:base" source="base-schema.xsd" />
          </schemas>
          <files>
              <include name="*.xml" />
          </files>
      </validatexml>

### Requirements

Assembly: NAnt.Contrib.Tasks (0.85.2479.0)