Skip to content

Latest commit

 

History

History
158 lines (113 loc) · 5.65 KB

File metadata and controls

158 lines (113 loc) · 5.65 KB

Changelog

All notable changes to XML.jl will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Added

  • New streaming tokenizer (XMLTokenizer module) for fine-grained XML token iteration.
  • XPath support via xpath(node, path).
  • test/test_libxml2_testcases.jl: 243 test cases borrowed from the libxml2 test suite covering CDATA, comments, processing instructions, attributes, namespaces, DTD internal subsets, entity references, whitespace handling, Unicode, error cases, and real-world document patterns.
  • AbstractTrees package extension: loading both XML and AbstractTrees enables print_tree, PreOrderDFS, Leaves, etc. on Node and LazyNode.

Fixed

  • Tokenizer: multi-byte UTF-8 in attribute values — Parsing attribute values containing multi-byte UTF-8 characters (e.g., <doc city="東京"/>) could produce a StringIndexError because attr_value() used byte arithmetic (ncodeunits - 1) instead of prevind to strip quotes. The same issue existed in _read_attr_value!.
  • Tokenizer: quotes inside DTD comments — A " or ' character inside a <!-- --> comment within a DTD internal subset caused the tokenizer to misinterpret it as a quoted string delimiter, leading to an "Unterminated quoted string" error. The DOCTYPE body parser now correctly skips comment content.

Fixed

  • XML.write now respects xml:space="preserve" and suppresses indentation for elements with this attribute (#49).

Fixed

  • Resolved remaining issues from #45 and fixed #46 (whitespace preservation edge cases) (#47).

Added

  • XML.write respects xml:space="preserve" on elements, suppressing automatic indentation (#45).

Fixed

  • String type ambiguity on Julia nightly resolved (#38).

Fixed

  • depth and parent functions corrected to work properly with the DOM tree API (#37).
  • escape updated to no longer be idempotent — every & is now escaped, matching spec behavior (#32, addressing #31).
  • pushfirst! support added for Node children (#29).

Fixed

  • Fixed #26.
  • CI updated to use julia-actions/cache@v4 and lts Julia version.

Added

  • h constructor for concise element creation (e.g., h.div("hello"; class="main")).

Fixed

  • Path definition error in README example (#20).

Fixed

  • Minor typos.

Added

  • Julia 1.6 compatibility (#16).

Changed

  • Smarter escaping logic.

Changed

  • Attribute internal representation changed from Dict to OrderedDict (later reverted to Vector{Pair}).

Fixed

  • Parse method fix.

Added

  • DTD parsing via parse_dtd.
  • is_simple and simple_value exports.
  • setindex! methods for modifying attributes.
  • unescape function.

Fixed

  • DOCTYPE parsing made case-insensitive.

Fixed

  • Write output fixes.

Changed

  • Major rewrite: introduced NodeType enum, Node{S} parametric struct, callable NodeType constructors, and XML.write.
  • Processing instruction support.
  • Benchmarks added.

Changed

  • Improved print output for AbstractXMLNode.

Added

  • AbstractTrees 0.4 compatibility (#5).

Added

  • Node implementation with print_tree.
  • Color output in REPL display.
  • Stopped stripping whitespace from text nodes.
  • Initial release.