Finds the child element with the given Path.Entry
(where this element is the root), if any, wrapped in an Option
.
Finds the element with the given Path
(where this element is the root), if any, wrapped in an Option
.
Finds the element with the given Path
(where this element is the root), if any, wrapped in an Option
.
Note that for each non-empty Path, we have:
findElemOrSelfByPath(path) == findChildElemByPathEntry(path.firstEntry) flatMap (e => e.findElemOrSelfByPath(path.withoutFirstEntry))
Returns (the equivalent of) findChildElemByPathEntry(entry).get
Returns (the equivalent of) findElemOrSelfByPath(path).get
This trait offers Path-based navigation support.
This trait typically does not show up in application code using yaidom, yet its (uniform) API does. Hence, it makes sense to read the documentation of this trait, knowing that the API is offered by multiple element implementations.
This trait is purely abstract. The most common implementation of this trait is eu.cdevreeze.yaidom.queryapi.IsNavigable.
IsNavigableApi more formally
Some properties are expected to hold for "navigable elements":
getElemOrSelfByPath(Path.Root) == self findElemOrSelfByPath(path1).flatMap(e => e.findElemOrSelfByPath(path2)) == findElemOrSelfByPath(path1.append(path2))
The captured element subtype