On this page
  1. parse-xml1
  2. Role
  3. Install
  4. Quickstart
  5. When to Reach for It
  6. Gotchas & Pitfalls
  7. Pairs With
  8. Metadata

parse-xml1

Prev: parse-mw | Up: projects | Next: parse-yaml
Rel: wispsy, Foundation, parse-html5, parse-yaml, parse-toml
Ref: wispsy on GitHub
Tags: #public #wispsy #project #foundation #tier/standard


Role

Source-preserving XML 1.0 parser for Python 3.14+ (0.1.0, zero runtime deps)—retaining exact source including declarations, comments, processing instructions, CDATA sections, whitespace, and entity references, with configurable character/node/nesting/entity-expansion limits and zero external DTD/entity fetches.

Install

python -m pip install parse-xml1

Quickstart

from parse_xml1 import Element, Text, parse

document = parse('<?xml version="1.0"?><greeting lang="en">Hello, XML!</greeting>')
greeting = document.root
assert isinstance(greeting, Element)
assert greeting.name == "greeting"
assert greeting.attributes[0].value == "en"
assert isinstance(greeting.children[0], Text)
assert greeting.to_xml() == '<greeting lang="en">Hello, XML!</greeting>'

When to Reach for It

Gotchas & Pitfalls

Pairs With


Metadata

type: project-card
slug: parse-xml1
org: wispsy
repo: wispsy/parse-xml1
package: parse-xml1
import_name: parse_xml1
version: 0.1.0
requires_python: ">=3.14"
layer: foundation
topic: wispsy-foundation
status: active
language: python
source_docs: README.md, docs/

Linked from

Related notes