Java Doc for XMLOutputFactory.java in  » 6.0-JDK-Core » xml » javax » xml » stream » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.stream 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.xml.stream.XMLOutputFactory

XMLOutputFactory
abstract public class XMLOutputFactory (Code)
Defines an abstract implementation of a factory for getting XMLEventWriters and XMLStreamWriters. The following table defines the standard properties of this specification. Each property varies in the level of support required by each implementation. The level of support required is described in the 'Required' column.
Configuration parameters
Property Name Behavior Return type Default Value Required
javax.xml.stream.isRepairingNamespacesdefaults prefixes on the output sideBooleanFalseYes

The following paragraphs describe the namespace and prefix repair algorithm:

The property can be set with the following code line: setProperty("javax.xml.stream.isRepairingNamespaces",new Boolean(true|false));

This property specifies that the writer default namespace prefix declarations. The default value is false.

If a writer isRepairingNamespaces it will create a namespace declaration on the current StartElement for any attribute that does not currently have a namespace declaration in scope. If the StartElement has a uri but no prefix specified a prefix will be assigned, if the prefix has not been declared in a parent of the current StartElement it will be declared on the current StartElement. If the defaultNamespace is bound and in scope and the default namespace matches the URI of the attribute or StartElement QName no prefix will be assigned.

If an element or attribute name has a prefix, but is not bound to any namespace URI, then the prefix will be removed during serialization.

If element and/or attribute names in the same start or empty-element tag are bound to different namespace URIs and are using the same prefix then the element or the first occurring attribute retains the original prefix and the following attributes have their prefixes replaced with a new prefix that is bound to the namespace URIs of those attributes.

If an element or attribute name uses a prefix that is bound to a different URI than that inherited from the namespace context of the parent of that element and there is no namespace declaration in the context of the current element then such a namespace declaration is added.

If an element or attribute name is bound to a prefix and there is a namespace declaration that binds that prefix to a different URI then that namespace declaration is either removed if the correct mapping is inherited from the parent context of that element, or changed to the namespace URI of the element or attribute using that prefix.


version:
   1.0
author:
   Copyright (c) 2003 by BEA Systems. All Rights Reserved.
See Also:   XMLInputFactory
See Also:   XMLEventWriter
See Also:   XMLStreamWriter
since:
   1.6


Field Summary
final public static  StringIS_REPAIRING_NAMESPACES
    

Constructor Summary
protected  XMLOutputFactory()
    

Method Summary
abstract public  XMLEventWritercreateXMLEventWriter(Result result)
     Create a new XMLEventWriter that writes to a JAXP result.
abstract public  XMLEventWritercreateXMLEventWriter(java.io.OutputStream stream)
    
abstract public  XMLEventWritercreateXMLEventWriter(java.io.OutputStream stream, String encoding)
    
abstract public  XMLEventWritercreateXMLEventWriter(java.io.Writer stream)
    
abstract public  XMLStreamWritercreateXMLStreamWriter(java.io.Writer stream)
    
abstract public  XMLStreamWritercreateXMLStreamWriter(java.io.OutputStream stream)
    
abstract public  XMLStreamWritercreateXMLStreamWriter(java.io.OutputStream stream, String encoding)
    
abstract public  XMLStreamWritercreateXMLStreamWriter(Result result)
     Create a new XMLStreamWriter that writes to a JAXP result.
abstract public  ObjectgetProperty(java.lang.String name)
    
abstract public  booleanisPropertySupported(String name)
     Query the set of properties that this factory supports.
public static  XMLOutputFactorynewInstance()
     Create a new instance of the factory.
public static  XMLInputFactorynewInstance(String factoryId, ClassLoader classLoader)
     Create a new instance of the factory.
abstract public  voidsetProperty(java.lang.String name, Object value)
     Allows the user to set specific features/properties on the underlying implementation.

Field Detail
IS_REPAIRING_NAMESPACES
final public static String IS_REPAIRING_NAMESPACES(Code)
Property used to set prefix defaulting on the output side




Constructor Detail
XMLOutputFactory
protected XMLOutputFactory()(Code)




Method Detail
createXMLEventWriter
abstract public XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException(Code)
Create a new XMLEventWriter that writes to a JAXP result. This method is optional.
Parameters:
  result - the result to write to
throws:
  UnsupportedOperationException - if this method is not supported by this XMLOutputFactory
throws:
  XMLStreamException -



createXMLEventWriter
abstract public XMLEventWriter createXMLEventWriter(java.io.OutputStream stream) throws XMLStreamException(Code)
Create a new XMLEventWriter that writes to a stream
Parameters:
  stream - the stream to write to
throws:
  XMLStreamException -



createXMLEventWriter
abstract public XMLEventWriter createXMLEventWriter(java.io.OutputStream stream, String encoding) throws XMLStreamException(Code)
Create a new XMLEventWriter that writes to a stream
Parameters:
  stream - the stream to write to
Parameters:
  encoding - the encoding to use
throws:
  XMLStreamException -



createXMLEventWriter
abstract public XMLEventWriter createXMLEventWriter(java.io.Writer stream) throws XMLStreamException(Code)
Create a new XMLEventWriter that writes to a writer
Parameters:
  stream - the stream to write to
throws:
  XMLStreamException -



createXMLStreamWriter
abstract public XMLStreamWriter createXMLStreamWriter(java.io.Writer stream) throws XMLStreamException(Code)
Create a new XMLStreamWriter that writes to a writer
Parameters:
  stream - the writer to write to
throws:
  XMLStreamException -



createXMLStreamWriter
abstract public XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream) throws XMLStreamException(Code)
Create a new XMLStreamWriter that writes to a stream
Parameters:
  stream - the stream to write to
throws:
  XMLStreamException -



createXMLStreamWriter
abstract public XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream, String encoding) throws XMLStreamException(Code)
Create a new XMLStreamWriter that writes to a stream
Parameters:
  stream - the stream to write to
Parameters:
  encoding - the encoding to use
throws:
  XMLStreamException -



createXMLStreamWriter
abstract public XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException(Code)
Create a new XMLStreamWriter that writes to a JAXP result. This method is optional.
Parameters:
  result - the result to write to
throws:
  UnsupportedOperationException - if this method is not supported by this XMLOutputFactory
throws:
  XMLStreamException -



getProperty
abstract public Object getProperty(java.lang.String name) throws IllegalArgumentException(Code)
Get a feature/property on the underlying implementation
Parameters:
  name - The name of the property The value of the property
throws:
  java.lang.IllegalArgumentException - if the property is not supported



isPropertySupported
abstract public boolean isPropertySupported(String name)(Code)
Query the set of properties that this factory supports.
Parameters:
  name - The name of the property (may not be null) true if the property is supported and false otherwise



newInstance
public static XMLOutputFactory newInstance() throws FactoryConfigurationError(Code)
Create a new instance of the factory.
throws:
  FactoryConfigurationError - if an instance of this factory cannot be loaded



newInstance
public static XMLInputFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError(Code)
Create a new instance of the factory.
Parameters:
  factoryId - Name of the factory to find, same asa property name
Parameters:
  classLoader - classLoader to use the factory implementation
throws:
  FactoryConfigurationError - if an instance of this factory cannot be loaded



setProperty
abstract public void setProperty(java.lang.String name, Object value) throws IllegalArgumentException(Code)
Allows the user to set specific features/properties on the underlying implementation.
Parameters:
  name - The name of the property
Parameters:
  value - The value of the property
throws:
  java.lang.IllegalArgumentException - if the property is not supported



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.