Skip to content

Instantly share code, notes, and snippets.

🐢
doing better

李文广 LiWenGu

🐢
doing better
View GitHub Profile
View createIndex.java
/**
* @Author liwenguang
* @Date 2019-02-20 15:40
* @Description 基于 tika 解析文件内容为字符串,使用 lucene 建立索引
*/
@Slf4j
public class CreateIndex {
public static final String INDEX_PATH = "hello_lucene/src/main/resources/";
@LiWenGu
LiWenGu / getResources
Last active Jan 24, 2019
[XPath] XPath parse DOM #java
View getResources
public void testXPath() throws Exception {
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setValidating(true);
documentBuilderFactory.setNamespaceAware(false);
documentBuilderFactory.setIgnoringComments(true);
documentBuilderFactory.setIgnoringElementContentWhitespace(false);
documentBuilderFactory.setCoalescing(false);
documentBuilderFactory.setExpandEntityReferences(true);
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
You can’t perform that action at this time.