Package org.dom4j

Examples of org.dom4j.IllegalAddException


/*     */
/*     */   protected Node asNode(Object object) {
/* 165 */     if ((object instanceof Node)) {
/* 166 */       return (Node)object;
/*     */     }
/* 168 */     throw new IllegalAddException("This list must contain instances of Node. Invalid type: " + object);
/*     */   }
View Full Code Here


/*     */   protected void checkAddElementAllowed(Element element)
/*     */   {
/* 238 */     Element root = getRootElement();
/*     */
/* 240 */     if (root != null)
/* 241 */       throw new IllegalAddException(this, element, "Cannot add another element to this Document as it already has a root element of: " + root.getQualifiedName());
/*     */   }
View Full Code Here

    public void add(Attribute attribute) {
        if (attribute.getParent() != null) {
            String message = "The Attribute already has an existing parent \""
                    + attribute.getParent().getQualifiedName() + "\"";

            throw new IllegalAddException(this, attribute, message);
        }

        if (attribute.getValue() == null) {
            // try remove a previous attribute with the same
            // name since adding an attribute with a null value
View Full Code Here

TOP

Related Classes of org.dom4j.IllegalAddException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.