Converts an scala.xml.PCData
to a eu.cdevreeze.yaidom.simple.Text
Converts an scala.xml.Comment
to a eu.cdevreeze.yaidom.simple.Comment
Converts an scala.xml.Document
to a eu.cdevreeze.yaidom.simple.Document.
Converts an scala.xml.Document
to a eu.cdevreeze.yaidom.simple.Document. The resulting yaidom Document has no document URI.
If the input Scala XML Document is not namespace-valid, an exception will be thrown.
Converts an scala.xml.Elem
to an eu.cdevreeze.yaidom.simple.Elem.
Converts an scala.xml.Elem
to an eu.cdevreeze.yaidom.simple.Elem.
If the input Scala XML Elem is not namespace-valid, an exception will be thrown.
Converts an scala.xml.EntityRef
to a eu.cdevreeze.yaidom.simple.EntityRef
Converts an scala.xml.Node
to an optional eu.cdevreeze.yaidom.simple.Node.
Converts an scala.xml.ProcInstr
to a eu.cdevreeze.yaidom.simple.ProcessingInstruction
Converts an scala.xml.Text
to a eu.cdevreeze.yaidom.simple.Text
Converts attributes, given as scala.xml.MetaData
, to an immutable.IndexedSeq[(QName, String)]
.
Converts the scala.xml.NamespaceBinding
to a yaidom Scope
.
Converts the scala.xml.NamespaceBinding
to a yaidom Scope
.
This implementation is brittle because of bug: SI 6939: Namespace binding (xmlns) is duplicated if a child redefines a prefix. (see https://issues.scala-lang.org/browse/SI-6939 and https://github.com/scala/scala/pull/1858). Still, this implementation tries to work around that bug.
Extracts the QName
of an attribute as scala.xml.MetaData
.
Extracts the QName
of an scala.xml.Elem
Converter from Scala XML nodes to yaidom nodes, in particular from
scala.xml.Elem
to eu.cdevreeze.yaidom.simple.Elem and fromscala.xml.Document
to eu.cdevreeze.yaidom.simple.Document.This converter is handy when one wants to use XML literals (as offered by standard Scala XML) in combination with yaidom.
This converter regards the input more like an "Elem" than an "ElemBuilder", in that scopes instead of namespace declarations are extracted from input "elements", and in that conversions to yaidom Elems do not take any additional parent scope parameter. On the other hand, Scala XML NamespaceBindings try to be a bit of both yaidom Scopes and yaidom Declarations.
Beware that conversions from Scala XML Elems to yaidom Elems will fail if the Scala XML Elem uses namespaces in element and/or attribute names that have not been declared!