public XmlElement createLastChild(String ns, String name) throws MbException { MbElement parent = getMbElement(); MbElement elm = parent.createElementAsLastChild(XmlUtil.getFolderElementType(parent), name, null); if (ns != null) { elm.setNamespace(ns); } return new XmlElement(elm, isReadOnly()); }
public void setAttribute(String ns, String name, String value) throws MbException { MbElement attr = getAttributeElement(ns, name); if (attr == null) { attr = getMbElement() .createElementAsFirstChild(XmlUtil.getAttributeType(getMbElement()), name, value); if (ns != null) { attr.setNamespace(ns); } } else { attr.setValue(value); } }