---
title: "Validate XML well-formedness with optional XSD"
method: POST
path: "/xml-validate.php"
tags: ["data"]
---

# Validate XML well-formedness with optional XSD

`POST /xml-validate.php`

## Request

- Base URL: `https://mate.tools/api/v1`
- URL: `https://mate.tools/api/v1/xml-validate.php`
- Auth: none declared

Checks XML for well-formedness. If `schema` is provided, also validates against the XSD. Reports errors with line/column. External entities and DTD fetches are disabled.

## Request body

- object
  - `xml` string, required
  - `schema` string

## Response `200`

Success

## Other responses

- `400`: Malformed request
- `413`: Request body or text exceeds 1 MB
- `429`: Rate limit exceeded (60/min, 600/hour per IP). Includes Retry-After header.

---

[API](https://skmtc.dev/mate/apis/mate-tools-api.md) · [All operations](https://skmtc.dev/mate/apis/mate-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mate/apis/mate-tools-api/revisions/874670b78962?raw)
