com.github.simy4.xpath.dom4j.navigator.node.Dom4jNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xpath-to-xml-dom4j Show documentation
Show all versions of xpath-to-xml-dom4j Show documentation
Convenient utility to build XML models by evaluating XPath expressions
package com.github.simy4.xpath.dom4j.navigator.node;
import com.github.simy4.xpath.XmlBuilderException;
import com.github.simy4.xpath.navigator.Node;
import org.dom4j.Attribute;
import org.dom4j.Element;
import org.dom4j.QName;
/**
* DOM4J node contract.
*
* @param DOM4J node type
* @author Alex Simkin
* @since 1.0
*/
public interface Dom4jNode extends Node {
N getNode();
/**
* Retrieves all child element nodes of this node.
*
* @return child element nodes
*/
Iterable> elements();
/**
* Retrieves all attributes of this node.
*
* @return attributes
*/
Iterable> attributes();
/**
* Creates XML attribute node and appends to ths node.
*
* @param attribute new XML attribute's name
* @return new attribute node
* @throws XmlBuilderException if failure occur during XML attribute creation
*/
Dom4jNode createAttribute(QName attribute) throws XmlBuilderException;
/**
* Creates XML element node and appends to ths node.
*
* @param element new XML element's name
* @return new element node
* @throws XmlBuilderException if failure occur during XML element creation
*/
Dom4jNode createElement(QName element) throws XmlBuilderException;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy