10. ADAT XML compatibility
This appendix records the compatibility target explicitly. “Compatible” means the same useful XML shapes and query behavior, not source compatibility with ADAT classes or preservation of every historical mutation and failure mode.
10.1. Implemented in the core package
Legacy capability |
|
Status |
|---|---|---|
File and stream readers |
|
Complete |
Reader rooted at an XPath subtree |
|
Complete |
Full XPath expressions |
libxml2-backed reader queries |
Complete |
Registered XPath namespaces |
|
Complete |
Primitive reads and writes |
|
Complete |
Attribute reads and writes |
XPath |
Complete |
Query count and existence |
|
Complete |
Query result and subtree printing |
|
Complete |
Destructive scalar replacement |
|
Complete |
Tag stack and empty tags |
|
Complete |
In-memory and file writers |
|
Complete |
Raw XML composition |
|
Complete |
Complex values |
|
Complete |
Primitive arrays |
compact whitespace |
Complete |
Structured arrays |
|
Complete |
Maps and pairs |
|
Complete representation |
Merge several map documents |
|
Complete extension |
Optional values |
|
Complete extension |
Repeated sibling values |
|
Complete extension |
Factory XML groups |
|
Complete |
10.2. Deliberate modernization
Legacy behavior |
Modern behavior |
|---|---|
Exceptions thrown as |
Typed |
|
|
One-based |
Zero-based standard containers |
7/15 digit floating output |
|
Ambiguous source handling only through constructors |
Explicit |
Map reads insert silently into existing contents |
|
File writers stream tags directly to disk |
|
10.3. Important behavioral differences
ADAT’s std::map reader inserted entries without clearing the destination and
silently retained an existing value when keys collided. Some catalog-loading
code used that behavior to combine several files. In xmlio, ordinary read
has conventional replacement semantics and rejects duplicate keys within one
document. Use read_map_into with DuplicateKeyPolicy::error,
keep_existing, or overwrite when combining catalogs.
ADAT’s file writer emitted XML incrementally. The current XMLFileWriter uses
the same DOM-backed implementation as XMLBufferWriter; flush and close
serialize the complete current document. This gives consistent validation and
subtree composition for normal configuration and result files, but it is not a
streaming solution for extremely large graph exports.
10.4. Compatibility adapters not in the core
The following APIs are not used by scattering_devel and are intentionally not
part of the core package:
XMLArrayWriter, the stateful fixed-size streaming array writer.XMLStructWriterBaseand its pointer-owned child-writer API.XMLSimpleSchemaWriterandXMLSchemaWriter, which emit XSD alongside XML.Source-level aliases in the old
ADATXML,XMLWriterAPI, andXMLArraynamespaces.
If legacy applications need source-level migration, these belong in a separate
xmlio_adat_compat adapter. Keeping them out of the core prevents obsolete
ownership and one-based-container conventions from becoming dependencies of
the new analysis suite.