com.dexcoder.commons.utils.SiteMapUtils Maven / Gradle / Ivy
//package com.dexcoder.commons.utils;
//
//import java.io.FileOutputStream;
//import java.io.PrintWriter;
//import java.util.List;
//import java.util.Map;
//
//import javax.xml.parsers.DocumentBuilder;
//import javax.xml.parsers.DocumentBuilderFactory;
//import javax.xml.parsers.ParserConfigurationException;
//import javax.xml.transform.OutputKeys;
//import javax.xml.transform.Transformer;
//import javax.xml.transform.TransformerFactory;
//import javax.xml.transform.dom.DOMSource;
//import javax.xml.transform.stream.StreamResult;
//
//import org.apache.commons.collections.CollectionUtils;
//import org.w3c.dom.Document;
//import org.w3c.dom.Element;
//
//import com.dexcoder.commons.exceptions.CommonsAssistantException;
//
///**
// * Created by liyd on 11/5/14.
// */
//public class SiteMapUtils {
//
// /**
// * 获取xml document对象
// *
// * @return
// */
// public static Document getDocument() {
//
// try {
// DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
// DocumentBuilder builder = factory.newDocumentBuilder();
// return builder.newDocument();
// } catch (ParserConfigurationException e) {
// throw new CommonsAssistantException("创建document对象失败", e);
// }
//
// }
//
// /**
// * 创建sitemap到指定路径下
// *
// * @param urlList
// * @param targetPath
// */
// public static void createSiteMapXml(List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy