use of org.jwildfire.create.tina.io.SimpleXMLBuilder in project JWildfire by thargor6.
the class FACLFlameWriter method getFlameXML.
public String getFlameXML(Flame pFlame) throws Exception {
SimpleXMLBuilder xb = new SimpleXMLBuilder();
List<SimpleXMLBuilder.Attribute<?>> flamesAttrList = new ArrayList<>();
flamesAttrList.add(new Attribute<String>("name", ""));
xb.beginElement("Flames", flamesAttrList);
// Flame
List<SimpleXMLBuilder.Attribute<?>> attrList = createFlameAttributes(pFlame, xb);
Layer layer = pFlame.getFirstLayer();
xb.beginElement("flame", attrList);
// XForm
for (XForm xForm : layer.getXForms()) {
xb.emptyElement("xform", createXFormAttrList(xb, layer, xForm));
}
// FinalXForms
for (XForm xForm : layer.getFinalXForms()) {
xb.emptyElement("finalxform", createXFormAttrList(xb, layer, xForm));
}
// Gradient
addGradient(xb, layer);
xb.endElement("flame");
xb.endElement("Flames");
return xb.buildXML();
}
Aggregations