A simple command-line tool written in C# to validate XML files against an XSD schema. This tool is useful for ensuring that your XML documents conform to the expected structure defined in the XSD.
- Validates an XML file against an XSD schema.
- Provides detailed error messages if validation fails.
- Lightweight and easy to use.
- .NET SDK 6.0 or later (for building the project).
-
Clone this repository:
git clone https://github.com/faridprogrammer/XSDValidator.git cd XSDValidator -
Build the project using the .NET SDK:
dotnet build -o output
The compiled executable will be available in the
outputfolder.
Run the executable with the following syntax:
XSDValidator.exe <XML_File_Path> <XSD_File_Path>To validate an XML file (example.xml) against an XSD file (example.xsd), use:
XSDValidator.exe "C:\path\to\example.xml" "C:\path\to\example.xsd"XML is valid.
Validation failed: The 'age' element is invalid - The value 'thirty' is not a valid integer.
XML file not found: C:\path\to\example.xml
For issues or feature requests, feel free to open an issue on GitHub or contact me at [faridbekran15@gmail.com].