https://github.com/dvreeze/yaidom
Yet another immutable XML DOM-like API
https://github.com/dvreeze/yaidom
query-api scala xml
Last synced: 3 months ago
JSON representation
Yet another immutable XML DOM-like API
- Host: GitHub
- URL: https://github.com/dvreeze/yaidom
- Owner: dvreeze
- License: apache-2.0
- Created: 2011-11-11T21:00:01.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2022-02-04T23:56:57.000Z (almost 4 years ago)
- Last Synced: 2025-08-03T20:14:37.333Z (5 months ago)
- Topics: query-api, scala, xml
- Language: Scala
- Homepage:
- Size: 5.44 MB
- Stars: 26
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
======
Yaidom
======
Yaidom is a uniform XML query API, written in Scala. Equally important, yaidom provides several specific-purpose DOM-like tree
implementations adhering to this XML query API. What's more, other implementations can easily be added.
Yaidom initially stood for yet another (Scala) immutable DOM-like API. Over time, the yaidom XML query API grew more important
than any single DOM-like tree implementation, whether immutable or mutable. Currently, the name yaidom reflects the ease with which
new DOM-like tree implementations can be added, while having them conform to the yaidom query API.
Why do we need yet another Scala (tree-oriented) XML library? After all, there are alternatives such as the standard Scala XML library.
Indeed, yaidom has several nice properties:
* the **uniform XML query API**, playing well with the **Scala Collections API** (and leveraging it internally)
* multiple (existing or future) **specific-purpose DOM-like tree implementations**, conforming to this XML query API
* among them, a nice immutable "default" DOM-like tree implementation
* precise and first-class **namespace support**
* **precision, clarity and minimality** in its genes, at the expense of some (but not much) verbosity and lack of XPath support
* acceptance of some XML realities, such as the peculiarities of "XML equality" and whitespace in XML
* and therefore no attempt to abstract **JAXP** away during parsing/serialization, but instead leveraging it (for parsing/serializing)
* easy **conversions** between several element implementations
* support for so-called **yaidom dialects**, using abstract query API traits for the backing elements and therefore supporting multiple XML backends
* a scope mainly limited to basic namespace-aware XML processing, and therefore not offering any XSD and DTD support
Usage
=====
Yaidom versions can be found in the Maven central repository. Assuming version 1.13.0, yaidom can be added as dependency
as follows (in an SBT or Maven build):
**SBT**::
libraryDependencies += "eu.cdevreeze.yaidom" %%% "yaidom" % "1.13.0"
**Maven2**::
eu.cdevreeze.yaidom
yaidom_3
1.13.0
Note that yaidom itself has a few dependencies, which will be transitive dependencies in projects that use yaidom.
Yaidom has been cross-built for several Scala versions, leading to artifactIds referring to different Scala (binary) versions.
One transitive dependency is Saxon-HE (9.9). If Saxon-EE is used in combination with yaidom, the Saxon-HE dependency must
be explicitly excluded!
Yaidom (1.8.X and later) requires Java version 1.8 or later!