@Immutable @Loggable(value=1) public final class Xembler extends Object
For example, to modify a DOM document:
Document dom = DocumentBuilderFactory.newInstance() .newDocumentBuilder().newDocument(); dom.appendChild(dom.createElement("root")); new Xembler( new XemblyBuilder() .xpath("/root") .addIfAbsent("employees") .add("employee") .attr("id", 6564) .directives() ).exec(dom);
Constructor and Description |
---|
Xembler(Collection<Directive> dirs)
Public ctor.
|
public Xembler(@NotNull(message="collection of directives can\'t be NULL") Collection<Directive> dirs)
dirs
- Directivespublic void exec(@NotNull(message="DOM can\'t be NULL") Document dom) throws ImpossibleModificationException
dom
- DOM documentImpossibleModificationException
- If can't modifyCopyright © 2013 Xembly. All rights reserved.