--- id: tree-sitter-xml version: "0.7.0" license: MIT license_treatment: permissive maintenance: dormant --- # tree-sitter-xml — XML & DTD grammars for tree-sitter License: permissive · Maintenance: dormant · Downloads: 2.2M/mo ## What it is and what it does tree-sitter-xml is a parser grammar for the tree-sitter parsing toolkit, providing syntax analysis for XML and DTD files. It follows the W3C XML 1.0 specification and related standards for schema and stylesheet associations. The package is a compiled grammar that integrates with tree-sitter's incremental parsing engine, allowing you to build syntax trees and perform structural analysis on XML documents. This is a grammar distribution, not a standalone parser—it requires the tree-sitter Python bindings to actually parse files. It's designed for use in editors (Neovim, Emacs) and development tools that need to understand XML structure. With no runtime dependencies and prebuilt wheels for major platforms, installation is straightforward on supported systems. Use it for: - Syntax highlighting and code navigation for XML files in editor plugins or language servers - Incremental parsing of XML documents in development tools to track structural changes - Building AST-based analysis or transformation tools for XML configuration files - DTD validation and schema-aware XML processing in custom parsing pipelines ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a tree-sitter parser grammar for XML and DTD files, enabling incremental parsing and syntax tree analysis of XML documents. Yes, if you're building XML parsing or analysis tooling with tree-sitter. The grammar is permissively licensed, installs easily on modern platforms, and has no runtime dependencies. Dormant maintenance is not a blocker for a grammar package—it's stable and unlikely to need frequent updates. Install only if you already use or plan to use tree-sitter's Python bindings. ## Install pip install tree-sitter-xml uv add tree-sitter-xml poetry add tree-sitter-xml ## Installing tree-sitter-xml Before you install: Medium install friction due to compiled wheels; prebuilt binaries available for common platforms (x86_64, arm64, macOS, Linux, Windows) and Python 3.9+. Dormant maintenance status (last release 2024-11-13, 639 days ago) means no active updates, though no recent issues reported. License in practice: MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice. Quickstart: pip install tree-sitter-xml import tree_sitter_xml # Use with tree-sitter Python bindings to parse XML Requires Python 3.9 or later; tree-sitter Python bindings must be installed separately to actually parse documents. Verify before relying: - Whether tree-sitter Python bindings are automatically pulled in or must be manually installed - Specific performance characteristics for large or deeply nested XML documents - Completeness of DTD support and any known parsing limitations ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: dormant - Downloads: 2.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags xml parser tree-sitter, incremental xml parsing, xml syntax tree, dtd parser, tree-sitter grammar xml, xml ast parsing, xml document analysis, parsing, tree-sitter, xml-grammar [View on SkillFed](https://skillfed.io/packages/tree-sitter-xml) · [View on PyPI](https://pypi.org/project/tree-sitter-xml/)