List of usage examples for org.dom4j.tree DefaultDocument add
public void add(Element element)
From source file:org.olat.ims.cp.objects.CPManifest.java
License:Apache License
/** * @param doc/*from w w w. ja v a 2 s . c o m*/ */ public void buildDocument(final DefaultDocument doc) { // Manifest is the root-node of the document, therefore we need to pass the // "doc" final DefaultElement manifestElement = new DefaultElement(CPCore.MANIFEST); manifestElement.add(new DefaultAttribute(CPCore.IDENTIFIER, this.identifier)); manifestElement.add(new DefaultAttribute(CPCore.SCHEMALOCATION, this.schemaLocation)); // manifestElement.setNamespace(this.getNamespace()); //FIXME: namespace doc.add(manifestElement); if (metadata != null) { metadata.buildDocument(manifestElement); } organizations.buildDocument(manifestElement); resources.buildDocument(manifestElement); }