1 3 19 20 package com.sun.org.apache.xml.internal.resolver.tools; 21 22 import org.xml.sax.*; 23 24 import javax.xml.parsers.*; 25 26 import com.sun.org.apache.xml.internal.resolver.*; 27 28 44 public class ResolvingXMLReader extends ResolvingXMLFilter { 45 46 public static boolean namespaceAware = true; 47 48 49 public static boolean validating = false; 50 51 58 public ResolvingXMLReader() { 59 super(); 60 SAXParserFactory spf = SAXParserFactory.newInstance(); 61 spf.setNamespaceAware(namespaceAware); 62 spf.setValidating(validating); 63 try { 64 SAXParser parser = spf.newSAXParser(); 65 setParent(parser.getXMLReader()); 66 } catch (Exception ex) { 67 ex.printStackTrace(); 68 } 69 } 70 71 78 public ResolvingXMLReader(CatalogManager manager) { 79 super(manager); 80 SAXParserFactory spf = SAXParserFactory.newInstance(); 81 spf.setNamespaceAware(namespaceAware); 82 spf.setValidating(validating); 83 try { 84 SAXParser parser = spf.newSAXParser(); 85 setParent(parser.getXMLReader()); 86 } catch (Exception ex) { 87 ex.printStackTrace(); 88 } 89 } 90 } 91 92 | Popular Tags |