< prev index next >

src/java.xml/share/classes/javax/xml/stream/XMLEventWriter.java

Print this page




  47  * @since 1.6
  48  */
  49 public interface XMLEventWriter extends XMLEventConsumer {
  50 
  51   /**
  52    * Writes any cached events to the underlying output mechanism
  53    * @throws XMLStreamException
  54    */
  55   public void flush() throws XMLStreamException;
  56 
  57   /**
  58    * Frees any resources associated with this stream
  59    * @throws XMLStreamException
  60    */
  61   public void close() throws XMLStreamException;
  62 
  63   /**
  64    * Add an event to the output stream
  65    * Adding a START_ELEMENT will open a new namespace scope that
  66    * will be closed when the corresponding END_ELEMENT is written.
  67    * <table border="2" rules="all" cellpadding="4">

  68    *   <thead>
  69    *     <tr>
  70    *       <th align="center" colspan="2">
  71    *         Required and optional fields for events added to the writer
  72    *       </th>
  73    *     </tr>
  74    *   </thead>
  75    *   <tbody>
  76    *     <tr>
  77    *       <th>Event Type</th>
  78    *       <th>Required Fields</th>
  79    *       <th>Optional Fields</th>
  80    *       <th>Required Behavior</th>
  81    *     </tr>


  82    *     <tr>
  83    *       <td> START_ELEMENT  </td>
  84    *       <td> QName name </td>
  85    *       <td> namespaces , attributes </td>
  86    *       <td> A START_ELEMENT will be written by writing the name,
  87    *       namespaces, and attributes of the event in XML 1.0 valid
  88    *       syntax for START_ELEMENTs.
  89    *       The name is written by looking up the prefix for
  90    *       the namespace uri.  The writer can be configured to
  91    *       respect prefixes of QNames.  If the writer is respecting
  92    *       prefixes it must use the prefix set on the QName.  The
  93    *       default behavior is to lookup the value for the prefix
  94    *       on the EventWriter's internal namespace context.
  95    *       Each attribute (if any)
  96    *       is written using the behavior specified in the attribute
  97    *       section of this table.  Each namespace (if any) is written
  98    *       using the behavior specified in the namespace section of this
  99    *       table.
 100    *       </td>
 101    *     </tr>




  47  * @since 1.6
  48  */
  49 public interface XMLEventWriter extends XMLEventConsumer {
  50 
  51   /**
  52    * Writes any cached events to the underlying output mechanism
  53    * @throws XMLStreamException
  54    */
  55   public void flush() throws XMLStreamException;
  56 
  57   /**
  58    * Frees any resources associated with this stream
  59    * @throws XMLStreamException
  60    */
  61   public void close() throws XMLStreamException;
  62 
  63   /**
  64    * Add an event to the output stream
  65    * Adding a START_ELEMENT will open a new namespace scope that
  66    * will be closed when the corresponding END_ELEMENT is written.
  67    * <table class="striped">
  68    *   <caption>Required and optional fields for events added to the writer</caption>
  69    *   <thead>
  70    *     <tr>







  71    *       <th>Event Type</th>
  72    *       <th>Required Fields</th>
  73    *       <th>Optional Fields</th>
  74    *       <th>Required Behavior</th>
  75    *     </tr>
  76    *   </thead>
  77    *   <tbody>
  78    *     <tr>
  79    *       <td> START_ELEMENT  </td>
  80    *       <td> QName name </td>
  81    *       <td> namespaces , attributes </td>
  82    *       <td> A START_ELEMENT will be written by writing the name,
  83    *       namespaces, and attributes of the event in XML 1.0 valid
  84    *       syntax for START_ELEMENTs.
  85    *       The name is written by looking up the prefix for
  86    *       the namespace uri.  The writer can be configured to
  87    *       respect prefixes of QNames.  If the writer is respecting
  88    *       prefixes it must use the prefix set on the QName.  The
  89    *       default behavior is to lookup the value for the prefix
  90    *       on the EventWriter's internal namespace context.
  91    *       Each attribute (if any)
  92    *       is written using the behavior specified in the attribute
  93    *       section of this table.  Each namespace (if any) is written
  94    *       using the behavior specified in the namespace section of this
  95    *       table.
  96    *       </td>
  97    *     </tr>


< prev index next >