Converts a yaidom Comment
to a DOM Comment
.
Converts a yaidom Comment
to a DOM Comment
. A DOM document is passed as node factory.
Converts a yaidom Document
to a function from DOM documents (as node factories) to (filled) DOM documents
Converts a yaidom Document
to a function from DOM documents (as node factories) to (filled) DOM documents
Converts a yaidom Elem
to a DOM element.
Converts a yaidom Elem
to a DOM element. A DOM document is passed as node factory.
The passed parent scope is used as follows: the namespace declarations on the result DOM element are:
parentScope.relativize(elm.scope)
.
Same as { doc => convertElem(elm, doc, Scope.Empty) }
Same as { doc => convertElem(elm, doc, Scope.Empty) }
Converts a yaidom EntityRef
to a DOM EntityReference
.
Converts a yaidom EntityRef
to a DOM EntityReference
. A DOM document is passed as node factory.
Converts a yaidom node to a DOM node.
Converts a yaidom node to a DOM node. A DOM document is passed as node factory. If the node is an element,
the passed parent scope is used as in convertElem(e, doc, parentScope)
.
Converts a yaidom ProcessingInstruction
to a DOM ProcessingInstruction
.
Converts a yaidom ProcessingInstruction
to a DOM ProcessingInstruction
. A DOM document is passed as node factory.
Converts a yaidom Text
to a DOM Text
.
Converts a yaidom Text
to a DOM Text
. A DOM document is passed as node factory.
Converts an org.w3c.dom.Comment
to a eu.cdevreeze.yaidom.simple.Comment
Converts an org.w3c.dom.Comment
to a eu.cdevreeze.yaidom.simple.Comment
Converts an org.w3c.dom.Document
to a eu.cdevreeze.yaidom.simple.Document.
Converts an org.w3c.dom.Document
to a eu.cdevreeze.yaidom.simple.Document.
Given a parent scope, converts an org.w3c.dom.Element
to a eu.cdevreeze.yaidom.simple.Elem.
Given a parent scope, converts an org.w3c.dom.Element
to a eu.cdevreeze.yaidom.simple.Elem.
The result Elem
gets Scope parentScope.resolve(extractNamespaceDeclarations(v.getAttributes))
.
Be careful: the namespaces inherited by the passed DOM element, if any, are ignored! In other words, the ancestry of the passed DOM element is entirely ignored. This may cause an exception to be thrown, if there are indeed such namespaces, unless they are a subset of the passed parent scope.
Converts an org.w3c.dom.EntityReference
to a eu.cdevreeze.yaidom.simple.EntityRef
Converts an org.w3c.dom.EntityReference
to a eu.cdevreeze.yaidom.simple.EntityRef
Given a parent scope, converts an org.w3c.dom.Node
to an optional eu.cdevreeze.yaidom.simple.Node.
Given a parent scope, converts an org.w3c.dom.Node
to an optional eu.cdevreeze.yaidom.simple.Node.
In case of an element, the result Elem
(wrapped in an Option) gets Scope
parentScope.resolve(extractNamespaceDeclarations(v.getAttributes))
.
Be careful: the namespaces inherited by the passed DOM node, if any, are ignored! In other words, the ancestry of the passed DOM node is entirely ignored. This may cause an exception to be thrown, if there are indeed such namespaces, unless they are a subset of the passed parent scope.
Converts an org.w3c.dom.ProcessingInstruction
to a eu.cdevreeze.yaidom.simple.ProcessingInstruction
Converts an org.w3c.dom.ProcessingInstruction
to a eu.cdevreeze.yaidom.simple.ProcessingInstruction
Converts an org.w3c.dom.Text
to a eu.cdevreeze.yaidom.simple.Text
Converts an org.w3c.dom.Text
to a eu.cdevreeze.yaidom.simple.Text
Converts a NamedNodeMap
to an immutable.IndexedSeq[(QName, String)]
.
Converts a NamedNodeMap
to an immutable.IndexedSeq[(QName, String)]
. Namespace declarations are skipped.
Extracts (optional) prefix and namespace.
Extracts (optional) prefix and namespace. Call only if isNamespaceDeclaration(v)
, since otherwise an exception is thrown.
Converts the namespace declarations in a NamedNodeMap
to a Declarations
Converts the namespace declarations in a NamedNodeMap
to a Declarations
Returns true if the org.w3c.dom.Attr
is a namespace declaration
Returns true if the org.w3c.dom.Attr
is a namespace declaration
Helper method that converts a NodeList
to an IndexedSeq[org.w3c.dom.Node]
Helper method that converts a NodeList
to an IndexedSeq[org.w3c.dom.Node]
Extracts the QName
of an org.w3c.dom.Attr
.
Extracts the QName
of an org.w3c.dom.Attr
. If the Attr
is a namespace declaration, an exception is thrown.
Extracts the QName
of an org.w3c.dom.Element
Extracts the QName
of an org.w3c.dom.Element
Conversions between yaidom nodes and DOM nodes.
These conversions are used in implementations of yaidom XML parsers and printers. They are also useful in application code. One scenario in which these conversions are useful is as follows: