生成Opencms Xml模板格式

Element root = new Element("Stores");
Document Doc = new Document(root);
root.setAttribute(new Attribute("noNamespaceSchemaLocation","opencms://system/modules/com.northface.product/schemas/Store.xsd",
Namespace.getNamespace("xsi","http://www.w3.org/2001/XMLSchema-instance")));//xml文件头


elements.addContent(new Element("Title").addContent(new CDATA(str[1]))); //Add <![CDATA]]>

你可能感兴趣的:(xml)