WebObjects 5.2

com.webobjects.foundation.xml
Class NSXMLOutputFormat

java.lang.Object
  |
  +--com.webobjects.foundation.xml.NSXMLOutputFormat

public final class NSXMLOutputFormat
extends Object

This simple class specifies an output format to control the XML output and is based on the XSLT specification for output format.


Constructor Summary
NSXMLOutputFormat()
          Creates an output format that has the following properties: indentation is on UTF-8 encoding XML 1.0 version not a standalone document XML declaration is written out
NSXMLOutputFormat(boolean on)
          Creates an output format that has the same properties as an default NSXMLOutputFormat except that for the identation property.
 
Method Summary
 String encoding()
          Returns the specified encoding.
 boolean indenting()
          Returns true if indentation was specified.
 boolean omitXMLDeclaration()
          Returns true if the XML document declaration should be ommited.
 void setEncoding(String encoding)
          Sets the encoding for this output method.
 void setIndenting(boolean on)
          Sets the indentation on and off.
 void setOmitXMLDeclaration(boolean omit)
          Sets XML declaration omitting on and off.
 void setVersion(String version)
          Sets the version for this XML output.
 String version()
          Returns the version for this output method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NSXMLOutputFormat

public NSXMLOutputFormat()
Creates an output format that has the following properties:

NSXMLOutputFormat

public NSXMLOutputFormat(boolean on)
Creates an output format that has the same properties as an default NSXMLOutputFormat except that for the identation property.
Parameters:
on - true if indentation should be on
Method Detail

encoding

public String encoding()
Returns the specified encoding. If no encoding was specified, the default is always "UTF-8".
Returns:
the encoding

indenting

public boolean indenting()
Returns true if indentation was specified.

omitXMLDeclaration

public boolean omitXMLDeclaration()
Returns true if the XML document declaration should be ommited. The default is false.

setEncoding

public void setEncoding(String encoding)
Sets the encoding for this output method. If no encoding was specified, the default is always "UTF-8".

setIndenting

public void setIndenting(boolean on)
Sets the indentation on and off.
Parameters:
on - true if indentation should be on

setOmitXMLDeclaration

public void setOmitXMLDeclaration(boolean omit)
Sets XML declaration omitting on and off.
Parameters:
true - if XML declaration should be ommited

setVersion

public void setVersion(String version)
Sets the version for this XML output. Currently, the value would be "1.0".
Parameters:
the - output method version, or null

version

public String version()
Returns the version for this output method. If no version was specified, will return null and the default version number will be used.

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.