Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a program to validate an XML string against a schema (XSD).

Hard

Problem Statement

Write a program to validate an XML string against a schema (XSD).

Sample Input

XML: <person><name>John</name><age>30</age></person> XSD: Schema definition provided in the problem.

Sample Output

XML is valid: True

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
using System; using System.Xml; using System.Xml.Schema; class ValidateXML { static void Main() { // Validate XML against XSD } }
Log in or sign up to run or submit your code.Log inSign up
Input
XML: <person><name>John</name><age>30</age></person> XSD: Schema definition provided in the problem.
Expected Output
XML is valid: True