1 16 package org.apache.commons.jxpath.xml; 17 18 import java.io.InputStream ; 19 20 27 public abstract class XMLParser2 implements XMLParser 28 { 29 private boolean validating = false; 30 private boolean namespaceAware = true; 31 private boolean whitespace = false; 32 private boolean expandEntityRef = true; 33 private boolean ignoreComments = false; 34 private boolean coalescing = false; 35 36 39 public void setValidating(boolean validating) { 40 this.validating = validating; 41 } 42 43 46 public boolean isValidating() { 47 return validating; 48 } 49 50 53 public boolean isNamespaceAware() { 54 return namespaceAware; 55 } 56 57 60 public void setNamespaceAware(boolean namespaceAware) { 61 this.namespaceAware = namespaceAware; 62 } 63 64 67 public void setIgnoringElementContentWhitespace(boolean whitespace) { 68 this.whitespace = whitespace; 69 } 70 71 74 public boolean isIgnoringElementContentWhitespace() { 75 return whitespace; 76 } 77 78 81 public boolean isExpandEntityReferences() { 82 return expandEntityRef; 83 } 84 85 88 public void setExpandEntityReferences(boolean expandEntityRef) { 89 this.expandEntityRef = expandEntityRef; 90 } 91 92 95 public boolean isIgnoringComments() { 96 return ignoreComments; 97 } 98 99 102 public void setIgnoringComments(boolean ignoreComments) { 103 this.ignoreComments = ignoreComments; 104 } 105 106 109 public boolean isCoalescing() { 110 return coalescing; 111 } 112 113 116 public void setCoalescing(boolean coalescing) { 117 this.coalescing = coalescing; 118 } 119 120 public abstract Object parseXML(InputStream stream); 121 } | Popular Tags |