Package org.dom4j

Examples of org.dom4j.ElementHandler


            saxReader.setMergeAdjacentText(true);
            saxReader.setStripWhitespaceText(true);
            saxReader.setErrorHandler(new WebBeansErrorHandler());
            saxReader.setEntityResolver(new WebBeansResolver());
            saxReader.setValidation(false);
            saxReader.setDefaultHandler(new ElementHandler()
            {
                public void onEnd(ElementPath path)
                {

                }
View Full Code Here


/*     */   }
/*     */
/*     */   public void endElement(String uri, String localName, String qName)
/*     */     throws SAXException
/*     */   {
/* 199 */     ElementHandler currentHandler = getElementStack().getDispatchHandler().getHandler(getElementStack().getPath());
/*     */
/* 202 */     super.endElement(uri, localName, qName);
/*     */
/* 204 */     if ((!activeHandlers()) &&
/* 205 */       (this.xmlWriter != null))
View Full Code Here

/* 174 */       this.path = (this.path + "/" + element.getName());
/*     */     }
/*     */
/* 177 */     if ((this.handlers != null) && (this.handlers.containsKey(this.path)))
/*     */     {
/* 180 */       ElementHandler handler = (ElementHandler)this.handlers.get(this.path);
/* 181 */       this.handlerStack.add(handler);
/*     */
/* 184 */       handler.onStart(elementPath);
/*     */     }
/* 188 */     else if ((this.handlerStack.isEmpty()) && (this.defaultHandler != null)) {
/* 189 */       this.defaultHandler.onStart(elementPath);
/*     */     }
/*     */   }
View Full Code Here

/*     */
/*     */   public void onEnd(ElementPath elementPath)
/*     */   {
/* 195 */     if ((this.handlers != null) && (this.handlers.containsKey(this.path)))
/*     */     {
/* 198 */       ElementHandler handler = (ElementHandler)this.handlers.get(this.path);
/* 199 */       this.handlerStack.remove(this.handlerStack.size() - 1);
/*     */
/* 202 */       handler.onEnd(elementPath);
/*     */     }
/* 206 */     else if ((this.handlerStack.isEmpty()) && (this.defaultHandler != null)) {
/* 207 */       this.defaultHandler.onEnd(elementPath);
/*     */     }
/*     */
View Full Code Here

/* 260 */     }throw new DocumentException(cause.getMessage(), cause);
/*     */   }
/*     */
/*     */   public void addObjectHandler(String path, JAXBObjectHandler handler)
/*     */   {
/* 275 */     ElementHandler eHandler = new UnmarshalElementHandler(this, handler);
/* 276 */     getReader().addHandler(path, eHandler);
/*     */   }
View Full Code Here

TOP

Related Classes of org.dom4j.ElementHandler

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.