1 package javax.xml.stream; 2 import javax.xml.stream.events.*; 3 import javax.xml.namespace.NamespaceContext ; 4 import javax.xml.namespace.QName ; 5 import java.util.Iterator ; 6 21 public abstract class XMLEventFactory { 22 protected XMLEventFactory(){} 23 24 28 public static XMLEventFactory newInstance() 29 throws FactoryConfigurationError 30 { 31 return (XMLEventFactory) FactoryFinder.find( 32 "javax.xml.stream.XMLEventFactory", 33 "com.sun.xml.internal.stream.events.XMLEventFactoryImpl"); 34 } 35 36 45 public static XMLEventFactory newInstance(String factoryId, 46 ClassLoader classLoader) 47 throws FactoryConfigurationError { 48 try { 49 return (XMLEventFactory) FactoryFinder.newInstance(factoryId, classLoader, false); 51 } catch (FactoryFinder.ConfigurationError e) { 52 throw new FactoryConfigurationError(e.getException(), 53 e.getMessage()); 54 } 55 } 56 57 64 public abstract void setLocation(Location location); 65 66 74 public abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value); 75 76 82 public abstract Attribute createAttribute(String localName, String value); 83 84 90 public abstract Attribute createAttribute(QName name, String value); 91 92 97 public abstract Namespace createNamespace(String namespaceURI); 98 99 105 public abstract Namespace createNamespace(String prefix, String namespaceUri); 106 107 120 public abstract StartElement createStartElement(QName name, 121 Iterator attributes, 122 Iterator namespaces); 123 124 134 public abstract StartElement createStartElement(String prefix, 135 String namespaceUri, 136 String localName); 137 152 public abstract StartElement createStartElement(String prefix, 153 String namespaceUri, 154 String localName, 155 Iterator attributes, 156 Iterator namespaces 157 ); 158 174 public abstract StartElement createStartElement(String prefix, 175 String namespaceUri, 176 String localName, 177 Iterator attributes, 178 Iterator namespaces, 179 NamespaceContext context 180 ); 181 182 189 public abstract EndElement createEndElement(QName name, 190 Iterator namespaces); 191 192 199 public abstract EndElement createEndElement(String prefix, 200 String namespaceUri, 201 String localName); 202 211 public abstract EndElement createEndElement(String prefix, 212 String namespaceUri, 213 String localName, 214 Iterator namespaces); 215 216 222 public abstract Characters createCharacters(String content); 223 224 229 public abstract Characters createCData(String content); 230 231 236 public abstract Characters createSpace(String content); 237 242 public abstract Characters createIgnorableSpace(String content); 243 244 248 public abstract StartDocument createStartDocument(); 249 250 258 public abstract StartDocument createStartDocument(String encoding, 259 String version, 260 boolean standalone); 261 262 269 public abstract StartDocument createStartDocument(String encoding, 270 String version); 271 272 278 public abstract StartDocument createStartDocument(String encoding); 279 280 284 public abstract EndDocument createEndDocument(); 285 286 292 public abstract EntityReference createEntityReference(String name, 293 EntityDeclaration declaration); 294 299 public abstract Comment createComment(String text); 300 301 307 public abstract ProcessingInstruction createProcessingInstruction(String target, 308 String data); 309 310 317 public abstract DTD createDTD(String dtd); 318 } 319 320 321 322 323 | Popular Tags |