List of usage examples for org.dom4j.tree FlyweightAttribute FlyweightAttribute
public FlyweightAttribute(String name, String value, Namespace namespace)
Attribute
with the specified local name, value and Namespace
. From source file:de.saar.coli.salsa.reiter.framenet.Frame.java
License:Open Source License
public Element exportToSalsaTiger() { Namespace ns = new Namespace("fd", "http://www.clt-st.de/framenet/frame-database"); Element elem = new DefaultElement("frame", ns); elem.add(new FlyweightAttribute("name", this.getName(), ns)); for (FrameElement fe : this.frameElements()) { Element fee = new DefaultElement("element", ns); fee.add(new FlyweightAttribute("name", fe.getName(), ns)); fee.add(new FlyweightAttribute("optional", String.valueOf(!fe.isCore()), ns)); elem.add(fee);//from w w w.ja v a 2 s . c om } return elem; }
From source file:org.apache.openmeetings.util.LangExport.java
License:Apache License
public static Element createRoot(Document document) { Element root = document.addElement("language"); Namespace xsi = new Namespace("xsi", "http://www.w3.org/2001/XMLSchema-instance"); root.add(xsi);/*w w w .ja v a 2s. co m*/ root.add(new FlyweightAttribute("noNamespaceSchemaLocation", "language.xsd", xsi)); return root; }