| java.lang.Object freemarker.ext.dom.NodeModel
All known Subclasses: freemarker.ext.dom.ElementModel, freemarker.ext.dom.AttributeNodeModel, freemarker.ext.dom.CharacterDataNodeModel, freemarker.ext.dom.PINodeModel, freemarker.ext.dom.DocumentTypeModel, freemarker.ext.dom.DocumentModel,
node | final Node node(Code) | | The W3C DOM Node being wrapped.
|
getDocumentBuilderFactory | public static DocumentBuilderFactory getDocumentBuilderFactory()(Code) | | the DOM Parser implementation that is used when building NodeModel objects from XML files. |
getNode | public Node getNode()(Code) | | the underling W3C DOM Node object that this TemplateNodeModelis wrapping. |
getXPathSupportClass | public static Class getXPathSupportClass()(Code) | | Get the currently used freemarker.ext.dom.XPathSupport used as the XPath engine.
Returns null if XPath support is disabled.
|
hashCode | final public int hashCode()(Code) | | |
mergeAdjacentText | public static void mergeAdjacentText(Node node)(Code) | | Merges adjacent text/cdata nodes, so that there are no
adjacent text/cdata nodes. Operates recursively
on the entire subtree. You thus lose information
about any CDATA sections occurring in the doc.
See Also: NodeModel.simplify |
parse | public static NodeModel parse(InputSource is, boolean removeComments, boolean removePIs) throws SAXException, IOException, ParserConfigurationException(Code) | | Create a NodeModel from a SAX input source. Adjacent text nodes will be merged (and CDATA sections
are considered as text nodes).
Parameters: removeComments - whether to remove all comment nodes (recursively) from the tree before processing Parameters: removePIs - whether to remove all processing instruction nodes(recursively from the tree before processing |
parse | public static NodeModel parse(File f, boolean removeComments, boolean removePIs) throws SAXException, IOException, ParserConfigurationException(Code) | | Create a NodeModel from an XML file.
Parameters: removeComments - whether to remove all comment nodes (recursively) from the tree before processing Parameters: removePIs - whether to remove all processing instruction nodes(recursively from the tree before processing |
removeComments | public static void removeComments(Node node)(Code) | | Recursively removes all comment nodes
from the subtree.
See Also: NodeModel.simplify |
removePIs | public static void removePIs(Node node)(Code) | | Recursively removes all processing instruction nodes
from the subtree.
See Also: NodeModel.simplify |
setDocumentBuilderFactory | public static void setDocumentBuilderFactory(DocumentBuilderFactory docBuilderFactory)(Code) | | Sets the DOM Parser implementation to be used when building NodeModel
objects from XML files.
|
setErrorHandler | public static void setErrorHandler(ErrorHandler errorHandler)(Code) | | sets the error handler to use when parsing the document.
|
setXPathSupportClass | public static void setXPathSupportClass(Class cl)(Code) | | Set an alternative implementation of freemarker.ext.dom.XPathSupport to use
as the XPath engine.
Parameters: cl - the class, or null to disable XPath support. |
simplify | public static void simplify(Node node)(Code) | | Removes comments and processing instruction, and then unites adjacent text nodes.
Note that CDATA sections count as text nodes.
|
size | final public int size()(Code) | | |
useDefaultXPathSupport | public static void useDefaultXPathSupport()(Code) | | Tells the system to use (restore) the default (initial) XPath system used by
this FreeMarker version on this system.
|
useJaxenXPathSupport | public static void useJaxenXPathSupport() throws Exception(Code) | | Convenience method. Tells the system to use Jaxen for XPath queries.
throws: Exception - if the Jaxen classes are not present. |
useXalanXPathSupport | public static void useXalanXPathSupport() throws Exception(Code) | | Convenience method. Tells the system to use Xalan for XPath queries.
throws: Exception - if the Xalan XPath classes are not present. |
|
|