xml

Installation
SKILL.md

Namespaces

  • XPath /root/child fails if document has default namespace—use //*[local-name()='child'] or register prefix
  • Default namespace (xmlns="...") applies to elements, not attributes—attributes need explicit prefix
  • Namespace prefix is arbitrary—<foo:element> and <bar:element> are identical if both prefixes map to same URI
  • Child elements don't inherit parent's prefixed namespace—each must declare or use prefix explicitly

Encoding

  • <?xml version="1.0" encoding="UTF-8"?> must match actual file encoding—mismatch corrupts non-ASCII
  • Encoding declaration must be first thing in file—no whitespace or BOM before it (except UTF-8 BOM allowed)
  • Default encoding is UTF-8 if declaration omitted—but explicit is safer across parsers

Escaping & CDATA

  • Five entities always escape in text: &amp; &lt; &gt; &quot; &apos;
  • CDATA sections <![CDATA[...]]> for blocks with many special chars—but ]]> inside CDATA breaks it
  • Attribute values: use &quot; if delimited by ", or &apos; if delimited by '
  • Numeric entities &#60; and &#x3C; work everywhere—useful for edge cases
Installs
2
Repository
clawic/skills
GitHub Stars
16
First Seen
Apr 20, 2026
xml — clawic/skills