Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/sw/RemoveTag.groovy

RemoveTag.groovy (revision 479)
1 1
package org.txm.sw
2 2

  
3
import javax.xml.parsers.*
4
import javax.xml.transform.*
5
import javax.xml.xpath.*
3
import java.io.File;
6 4

  
7
import org.txm.importer.PersonalNamespaceContext
8
import org.txm.utils.xml.DomUtils
9
import org.w3c.dom.Document
10
import org.w3c.dom.Element
5
import org.txm.utils.xml.DomUtils;
6
import org.w3c.dom.Element;
7
import java.io.File;
11 8

  
9
import org.w3c.dom.Document;
10

  
11
import javax.xml.parsers.*;
12
import javax.xml.xpath.*;
13
import javax.xml.transform.*;
14
import javax.xml.transform.dom.DOMSource;
15
import javax.xml.transform.stream.StreamResult;
16
import org.txm.importer.graal.PersonalNamespaceContext;
17

  
12 18
class RemoveTag {
13 19

  
14 20
	public static boolean xpath(File xmlfile, String xpath)
......
23 29

  
24 30
		DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
25 31
		domFactory.setNamespaceAware(true); // never forget this!
32
		domFactory.setXIncludeAware(true);
26 33
		DocumentBuilder builder = domFactory.newDocumentBuilder();
27 34
		Document doc = builder.parse(xmlfile);
28 35

  
......
52 59

  
53 60
		DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
54 61
		domFactory.setNamespaceAware(true); // never forget this!
62
		domFactory.setXIncludeAware(true);
55 63
		DocumentBuilder builder = domFactory.newDocumentBuilder();
56 64
		Document doc = builder.parse(xmlfile);
57 65
		XPathFactory xpathfactory = XPathFactory.newInstance();

Also available in: Unified diff