List of usage examples for org.dom4j.tree DefaultElement attributes
Object attributes
To view the source code for org.dom4j.tree DefaultElement attributes.
Click Source Link
From source file:org.brunocvcunha.taskerbox.core.TaskerboxXmlReader.java
License:Apache License
private void handleMacrosNode(Element xmlChannel) throws IOException { for (Object attrObj : xmlChannel.elements()) { DefaultElement e = (DefaultElement) attrObj; StringWriter sw = new StringWriter(); XMLWriter writer = new XMLWriter(sw); writer.write(e.elements());//from ww w. j a va 2 s. c o m if (this.tasker.getMacros().containsKey(e.attributeValue("name"))) { throw new RuntimeException("Macro " + e.attributeValue("name") + " already exists in map."); } this.tasker.getMacros().put(e.attributeValue("name"), sw.toString()); this.tasker.getMacroAttrs().put(e.attributeValue("name"), e.attributes()); } }
From source file:org.olat.ims.cp.objects.CPOrganization.java
License:Apache License
/** * this constructor is used when the cp is built (parsing XML manifest file) * // w w w.j av a 2 s .c o m * @param me */ CPOrganization(final DefaultElement me) { super(me.getName()); items = new Vector<CPItem>(); errors = new Vector<String>(); setAttributes(me.attributes()); setContent(me.content()); this.identifier = me.attributeValue(CPCore.IDENTIFIER); this.structure = me.attributeValue(CPCore.STRUCTURE, "hierarchical"); // this.title = me. }
From source file:org.olat.ims.cp.objects.CPResources.java
License:Apache License
/** * this constructor i used when building up the cp (parsing XML manifest) * //from ww w . j a v a 2 s .co m * @param me */ public CPResources(final DefaultElement me) { super(me.getName()); log = Logger.getLogger(this.getClass()); resources = new Vector<CPResource>(); errors = new Vector<String>(); setAttributes(me.attributes()); setContent(me.content()); }