/** * Removes a DOM element <u>during the assembly phase</u>. * <p/> * The element is visited by this Assembly Unit before it's child content * has been iterated over. * <h3>.cdrl Configuration</h3> * <pre> * <smooks-resource useragent="<i>device/profile</i>" selector="<i>target-element-name</i>" * path="org.milyn.cdres.assemble.RemoveElementAU" /></pre> * See {@link org.milyn.cdr.SmooksResourceConfiguration}. * @author tfennelly */ @Phase(VisitPhase.ASSEMBLY) public class RemoveElementAU implements DOMElementVisitor { public void visitBefore(Element element, ExecutionContext executionContext) { element.getParentNode().removeChild(element); } /* (non-Javadoc) * @see org.milyn.delivery.dom.DOMElementVisitor#visitAfter(org.w3c.dom.Element, org.milyn.container.ExecutionContext) */ public void visitAfter(Element element, ExecutionContext request) { } }
String visitPhase = resourceConfig.getStringParameter("VisitPhase", VisitPhase.PROCESSING.toString()); if(phaseAnnotation != null && phaseAnnotation.value() == VisitPhase.ASSEMBLY) {
String visitPhase = resourceConfig.getStringParameter("VisitPhase", VisitPhase.PROCESSING.toString()); if(phaseAnnotation != null && phaseAnnotation.value() == VisitPhase.ASSEMBLY) {
/** * Removes a DOM element <u>during the assembly phase</u>. * <p/> * The element is visited by this Assembly Unit before it's child content * has been iterated over. * <h3>.cdrl Configuration</h3> * <pre> * <smooks-resource useragent="<i>device/profile</i>" selector="<i>target-element-name</i>" * path="org.milyn.cdres.assemble.RemoveElementAU" /></pre> * See {@link org.milyn.cdr.SmooksResourceConfiguration}. * @author tfennelly */ @Phase(VisitPhase.ASSEMBLY) public class RemoveElementAU implements DOMElementVisitor { public void visitBefore(Element element, ExecutionContext executionContext) { element.getParentNode().removeChild(element); } /* (non-Javadoc) * @see org.milyn.delivery.dom.DOMElementVisitor#visitAfter(org.w3c.dom.Element, org.milyn.container.ExecutionContext) */ public void visitAfter(Element element, ExecutionContext request) { } }
String visitPhase = resourceConfig.getStringParameter("VisitPhase", VisitPhase.PROCESSING.toString()); if(phaseAnnotation != null && phaseAnnotation.value() == VisitPhase.ASSEMBLY) {
/** * Removes a DOM element <u>during the assembly phase</u>. * * The element is visited by this Assembly Unit before it's child content * has been iterated over. * <h3>.cdrl Configuration</h3> * <pre> * <smooks-resource useragent="<i>device/profile</i>" selector="<i>target-element-name</i>" * path="org.milyn.cdres.assemble.RemoveElementAU" /></pre> * See {@link org.milyn.cdr.SmooksResourceConfiguration}. * @author tfennelly */ @Phase(VisitPhase.ASSEMBLY) public class RemoveElementAU implements DOMElementVisitor { public void visitBefore(Element element, ExecutionContext executionContext) { element.getParentNode().removeChild(element); } /* (non-Javadoc) * @see org.milyn.delivery.dom.DOMElementVisitor#visitAfter(org.w3c.dom.Element, org.milyn.container.ExecutionContext) */ public void visitAfter(Element element, ExecutionContext request) { } }
String visitPhase = resourceConfig.getStringParameter("VisitPhase", VisitPhase.PROCESSING.toString()); if(phaseAnnotation != null && phaseAnnotation.value() == VisitPhase.ASSEMBLY) {
/** * Removes a DOM element <u>during the assembly phase</u>. * <p/> * The element is visited by this Assembly Unit before it's child content * has been iterated over. * <h3>.cdrl Configuration</h3> * <pre> * <smooks-resource useragent="<i>device/profile</i>" selector="<i>target-element-name</i>" * path="org.milyn.cdres.assemble.RemoveElementAU" /></pre> * See {@link org.milyn.cdr.SmooksResourceConfiguration}. * @author tfennelly */ @Phase(VisitPhase.ASSEMBLY) public class RemoveElementAU implements DOMElementVisitor { public void visitBefore(Element element, ExecutionContext executionContext) { element.getParentNode().removeChild(element); } /* (non-Javadoc) * @see org.milyn.delivery.dom.DOMElementVisitor#visitAfter(org.w3c.dom.Element, org.milyn.container.ExecutionContext) */ public void visitAfter(Element element, ExecutionContext request) { } }