PureXML/Sources/Model
Mihaela Mihaljevic 741e65cae1 feat(model): TreeNode editing helpers (attributes, shallow copy, order, normalize)
Add the DOM/tree editing primitives from the audit that the editor use
case needs:

- Attribute helpers: attributeValue(_:), setAttribute(_:_:) (update in
  place or append), removeAttribute(_:).
- shallowCopy() copies a node alone, complementing the deep copy().
- precedes(_:) compares two nodes in document order (ancestor before
  descendant, earlier sibling before later; unrelated nodes compare false).
- normalize() coalesces adjacent text children, drops empty text, and
  recurses into elements; CDATA is left intact.

First-class namespace/DOCTYPE/entity-reference nodes (an invasive
TreeNodeKind change) and cross-document adoption/ownerDocument (no
document-identity model) are left for a follow-up.

Closes #90
2026-06-08 15:19:33 +02:00
..
Attribute.swift chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
Element.swift chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
Node.swift chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
QualifiedName.swift feat(parser): resolve XML namespaces at the start-element boundary 2026-06-08 01:03:29 +02:00
TreeNode.swift feat(editor): structured quick-fixes from completions 2026-06-08 13:35:33 +02:00
TreeNodeConversion.swift feat(model): mutable parent-aware tree (libxml2 tree.h parity) 2026-06-08 03:13:59 +02:00
TreeNodeEditing.swift feat(model): TreeNode editing helpers (attributes, shallow copy, order, normalize) 2026-06-08 15:19:33 +02:00
TreeNodeMutation.swift feat(model): mutable parent-aware tree (libxml2 tree.h parity) 2026-06-08 03:13:59 +02:00
TreeNodeNavigation.swift feat(model): mutable parent-aware tree (libxml2 tree.h parity) 2026-06-08 03:13:59 +02:00
TreeNodeSpan.swift feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00