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

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jsr173 Stax » 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


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)
    
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.