The XML Lens library
A little clarity for every XML task.
Practical explanations, fair comparisons, and workflows you can use on your Mac.
Learn the essentials.
Work through a problem, one example at a time.
How to format XML on a Mac (pretty-print)
Pretty-print XML on a Mac with the built-in xmllint, VS Code or an app, plus a tested list of what xmllint --format changes besides indentation.
Read guide →XML fundamentalsHow to link an XML file to its XSD (xsi:schemaLocation)
Point an XML file at its XSD with xsi:schemaLocation or xsi:noNamespaceSchemaLocation, write the pairs and paths correctly, and avoid the mistakes that break it.
Read guide →TroubleshootingXSD validation errors explained, with fixes
What each common XSD validation error means in xmllint, Xerces, Eclipse, and VS Code (cvc-complex-type.2.4.a, cvc-enumeration-valid and more), and how to fix it.
Read guide →How-toHow to create an XML file from an XSD
Create a valid XML document from an XSD: read the schema's root element, order, and required parts by hand, or generate a starting document in XML Lens, Visual Studio, Eclipse, or IntelliJ.
Read guide →How-toHow to validate XML against an XSD
Validate XML against an XSD on a Mac, in VS Code, Visual Studio or code, read each validation error, and fix the namespace mistakes behind most failures.
Read guide →How-toHow to open an XSD file
Open an XSD file on Mac or Windows with a text editor or an XSD viewer, read what the schema defines, and keep its include and import files together.
Read guide →How-toHow to compare two XML files
Compare two XML files without formatting noise: canonicalize, re-indent, and diff, with commands for Mac, a Python script, and a side-by-side view.
Read guide →TroubleshootingHow to fix XML parse errors
Find and fix common XML parse errors: mismatched tags, unescaped ampersands, missing quotes, and multiple roots, with before-and-after examples.
Read guide →XPath explainedWhy XPath returns no results with a default namespace
Understand why XPath 1.0 misses elements in a default XML namespace, and use namespace-aware expressions with a worked catalog example.
Read guide →XML fundamentalsWell-formed XML vs. XSD-valid XML
Learn the difference between XML syntax checks and XSD validation, with a complete quantity schema and examples that pass or fail each check.
Read guide →Fair comparisonBest XML editors for Mac: 6 options compared
Compare six XML editors for Mac by use case, XML and XSD features, XPath and XSLT support, privacy model, pricing model, and limitations.
Read guide →Find your workflow.
In-depth guides to the tools inside XML Lens.
Convert XML to Markdown locally on Mac
Convert XML to clean Markdown on Mac with tables, outlines, and code fences. Copy a Visual Map subtree or save a local .md file—nothing is uploaded.
View and map XML Schema (XSD) locally on Mac
View any XSD as a searchable schema tree on Mac, map type relationships, and resolve local imports and includes. A private alternative to online XSD viewers.
See any XML document as an interactive map
Visualize XML on Mac as an interactive node map. Pan, zoom, inspect namespaces and values, and jump back to source without uploading files.
Merge XML files locally on Mac
Merge two to five XML files into one on your Mac: wrap them under a new root or combine matching roots, with examples and a free Terminal method. No uploads.
View, read, and format XML on your Mac
A native XML viewer and editor for Mac: open any XML file as a structure tree beside highlighted source, then search, format, and query it locally.
Compare XML files side by side on Mac
Compare two editable XML documents on macOS with line-level highlighting, pasted or dragged input, and Markdown, HTML, or PDF diff reports.
Query XML with XPath 1.0 on your Mac
Run XPath 1.0 queries against an open XML document with match previews, namespace-aware navigation, saved snippets, and local processing.
Convert XML, JSON, YAML, and CSV locally on Mac
Convert XML to JSON, YAML, or CSV on macOS, with explicit loss warnings for mixed content, namespaces, ordering, comments, and other XML details.
Validate XML and run local XSLT 1.0 on Mac
Check XML well-formedness, validate against XSD, and transform an open document with local XSLT 1.0 while blocking remote stylesheet resources.
Write valid XML as you type with an XSD on Mac
Attach an XSD and XML Lens suggests allowed elements, attributes, and values, validates as you type, and fixes errors in one click. Private, on your Mac.
Batch-process XML files on Mac without overwriting originals
Run formatting, minification, validation, conversion, or local XSLT operations across selected XML files with a chosen output folder.