All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class com.jclark.xml.output.XMLWriter
java.lang.Object
   |
   +----java.io.Writer
           |
           +----com.jclark.xml.output.XMLWriter
  -  public abstract class XMLWriter
  -  extends Writer
An extension ofWriter for writing XML documents.
 The normal write methods write character data,
 automatically escaping markup characters.
   
  -   XMLWriter(Object) XMLWriter(Object)
-  
   
  -   attribute(String, String) attribute(String, String)
-   Writes an attribute.
  
-   cdataSection(String) cdataSection(String)
-   Writes a CDATA section.
  
-   characterReference(int) characterReference(int)
-   Writes a character reference.
  
-   comment(String) comment(String)
-   Writes a comment.
  
-   endAttribute() endAttribute()
-   Ends an attribute.
  
-   endElement(String) endElement(String)
-   Ends an element.
  
-   endReplacementText() endReplacementText()
-   Ends the replacement text for an internal entity.
  
-   entityReference(boolean, String) entityReference(boolean, String)
-   Writes an entity reference.
  
-   markup(String) markup(String)
-   Writes markup.
  
-   processingInstruction(String, String) processingInstruction(String, String)
-   Writes a processing instruction.
  
-   startAttribute(String) startAttribute(String)
-   Starts an attribute.
  
-   startElement(String) startElement(String)
-   Starts an element.
  
-   startReplacementText() startReplacementText()
-   Starts the replacement text for an internal entity.
   
 XMLWriter
XMLWriter
 protected XMLWriter(Object lock)
   
 startElement
startElement
 public abstract void startElement(String name) throws IOException
  -  Starts an element.
 This may be followed by zero or more calls to attribute.
 The start-tag will be closed by the first following call to any method
 other thanattribute.
 
 attribute
attribute
 public abstract void attribute(String name,
                                String value) throws IOException
  -  Writes an attribute.
 This is not legal if there have been calls to methods other than
 attributesince the last call tostartElement,
 unless inside astartAttribute,endAttributepair.
 
 startAttribute
startAttribute
 public abstract void startAttribute(String name) throws IOException
  -  Starts an attribute.
 This writes the attribute name, =and the opening
 quote.
 This provides an alternative toattributethat allows markup to be included in the attribute value.
 The value of the attribute is written using the normalwritemethods;endAttributemust be called at the end
 of the attribute value.
 Entity and character references can be written usingentityReferenceandcharacterReference.
 
 endAttribute
endAttribute
 public abstract void endAttribute() throws IOException
  -  Ends an attribute.
 This writes the closing quote of the attribute value.
 
 endElement
endElement
 public abstract void endElement(String name) throws IOException
  -  Ends an element.
 This may output an end-tag or close the current start-tag as an
 empty element.
 
 processingInstruction
processingInstruction
 public abstract void processingInstruction(String target,
                                            String data) throws IOException
  -  Writes a processing instruction.
 If datais non-empty a space will be inserted automatically
 to separate it from thetarget.
 
 comment
comment
 public abstract void comment(String body) throws IOException
  -  Writes a comment.
 
 entityReference
entityReference
 public abstract void entityReference(boolean isParam,
                                      String name) throws IOException
  -  Writes an entity reference.
 
 characterReference
characterReference
 public abstract void characterReference(int n) throws IOException
  -  Writes a character reference.
 
 cdataSection
cdataSection
 public abstract void cdataSection(String content) throws IOException
  -  Writes a CDATA section.
 
 startReplacementText
startReplacementText
 public abstract void startReplacementText() throws IOException
  -  Starts the replacement text for an internal entity.
 The replacement text must be ended with
 endReplacementText.
 This enables an extra level of escaping that protects
 against the process of constructing an entity's replacement
 text from the literal entity value.
 See Section 4.5 of the XML Recommendation.
 Between a call tostartReplacementTextandendReplacementText, the argument tomarkupwould specify entity replacement text;
 these would be escaped so that when processed as
 a literal entity value, the specified entity replacement text
 would be constructed.
 This call does not itself cause anything to be written.
 
 endReplacementText
endReplacementText
 public abstract void endReplacementText() throws IOException
  -  Ends the replacement text for an internal entity.
 This disables the extra level of escaping enabled by
 startReplacementText.
 This call does not itself cause anything to be written.
 
 markup
markup
 public abstract void markup(String str) throws IOException
  -  Writes markup.  The characters in the string will be written as is
 without being escaped (except for any escaping enabled by
 startReplacementText).
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index