List of usage examples for com.liferay.portal.kernel.xml Document addElement
public Element addElement(String qualifiedName, String namespaceURI);
From source file:com.liferay.portlet.layoutsadmin.util.SitemapImpl.java
License:Open Source License
public String getSitemap(long groupId, boolean privateLayout, ThemeDisplay themeDisplay) throws PortalException, SystemException { Document document = SAXReaderUtil.createDocument(); document.setXMLEncoding(StringPool.UTF8); Element rootElement = document.addElement("urlset", "http://www.google.com/schemas/sitemap/0.84"); List<Layout> layouts = LayoutLocalServiceUtil.getLayouts(groupId, privateLayout, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID); visitLayouts(rootElement, layouts, themeDisplay); return document.asXML(); }