public class DocumentParser extends Object
| Constructor and Description |
|---|
DocumentParser() |
| Modifier and Type | Method and Description |
|---|---|
static List<Node> |
findMathMLNodes(Document doc)
Find MathML nodes in the W3C DOM represented input XML document and
return collection of links to thiese nodes to the DOM.
|
public static List<Node> findMathMLNodes(Document doc)
Find MathML nodes in the W3C DOM represented input XML document and return collection of links to thiese nodes to the DOM.
The method is XML namespace aware and expectes the input DOM to be build
as XML aware (see
DocumentBuilderFactory.setNamespaceAware(boolean)).
In case the input DOM was created as namespace unaware or the input XML document does not correctly use namespaces the method tries to fall back to element-plain-name-only maths nodes detection. The behaviour is as follows:
Constants.MATHML_ROOT_ELEM) in MathML namespace, i.e. XML
namespace represented by URI
http://www.w3.org/1998/Math/MathML (see
Constants.MATHML_NS). If at least one element is found, stop
futher processing and return collection of links to these nodes.doc - W3C DOM representation of the XML document to find maths nodes
in.DOMBuilderCopyright © 2016. All rights reserved.