This package contains element representations that can be compared for (some notion of "value") equality, unlike normal yaidom nodes.
That notion of equality is simple to understand, but "naive". The user is of the API must take control over what is compared
for equality.
The most important difference with normal Elems is that qualified names do not occur,
but only expanded (element and attribute) names. This reminds of James Clark notation for XML trees and
expanded names, where qualified names are absent.
Moreover, the only nodes in this package are element and text nodes.
Below follows a simple example query, using the uniform query API:
// Note the import of package resolved, and not of its members. That is indeed a best practice!import eu.cdevreeze.yaidom.resolved
val resolvedBookstoreElem = resolved.Elem(bookstoreElem)
val scalaBookAuthors =
for {
bookElem <- resolvedBookstoreElem \ EName("{http://bookstore/book}Book")
if (bookElem \@ EName("ISBN")) == Some("978-0981531649")
authorElem <- bookElem \\ EName("{http://bookstore/author}Author")
} yield authorElem
The query for Scala book authors would have been exactly the same if normal Elems had been used instead of resolved.Elems
(replacing resolvedBookstoreElem by bookstoreElem)!
This package contains element representations that can be compared for (some notion of "value") equality, unlike normal yaidom nodes. That notion of equality is simple to understand, but "naive". The user is of the API must take control over what is compared for equality.
See eu.cdevreeze.yaidom.resolved.Node for why this package is named
resolved
.The most important difference with normal
Elem
s is that qualified names do not occur, but only expanded (element and attribute) names. This reminds of James Clark notation for XML trees and expanded names, where qualified names are absent.Moreover, the only nodes in this package are element and text nodes.
Below follows a simple example query, using the uniform query API:
The query for Scala book authors would have been exactly the same if normal
Elem
s had been used instead ofresolved.Elem
s (replacingresolvedBookstoreElem
bybookstoreElem
)!