All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.simy4.xpath.dom4j.navigator.node.Dom4jNode Maven / Gradle / Ivy

Go to download

Convenient utility to build XML models by evaluating XPath expressions

There is a newer version: 2.3.9
Show newest version
package com.github.simy4.xpath.dom4j.navigator.node;

import com.github.simy4.xpath.XmlBuilderException;
import com.github.simy4.xpath.navigator.Node;
import org.dom4j.QName;

/**
 * DOM4J node contract.
 *
 * @author Alex Simkin
 * @since 1.0
 */
public interface Dom4jNode extends Node {

    org.dom4j.Node getNode();

    /**
     * Retrieves parent node of this node.
     *
     * @return parent node
     */
    Dom4jNode getParent();

    /**
     * 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 - 2025 Weber Informatics LLC | Privacy Policy