Making ElemApi filter/find methods accept ENames which are implicitly converted to element predicates.
Returns the equivalent of withEName(Some(namespace), localPart)
Returns the equivalent of { _.ename == EName(namespaceOption, localPart) }
, but without creating any EName instance.
Returns the equivalent of { _.ename == ename }
Returns the equivalent of { _.localName == localName }
Returns the equivalent of withEName(None, localPart)
This companion object offers some convenience factory methods for "element predicates", that can be used in yaidom queries. These factory objects turn ENames and local names into "element predicates".
For example:
elem \\ (_.ename == EName(xsNamespace, "element"))
can also be written as:
elem \\ withEName(xsNamespace, "element")
(thus avoiding EName instance construction, whether or not this makes any difference in practice).
If the namespace is "obvious", and more friendly local-name-based querying is desired, the following could be written:
elem \\ withLocalName("element")