com.japisoft.fastparser.document
Class Document

java.lang.Object
  |
  +--com.japisoft.fastparser.document.Document

public class Document
extends java.lang.Object

Main XML document

Version:
1.1
Author:
(c) 2002-2003 JAPISOFT
See Also:
MutableNode

Field Summary
static java.lang.String ENCODING_EUC_JP
           
static java.lang.String ENCODING_ISO_10646_UCS_2
           
static java.lang.String ENCODING_ISO_10646_UCS_4
           
static java.lang.String ENCODING_ISO_2022_JP
           
static java.lang.String ENCODING_ISO_8859_1
           
static java.lang.String ENCODING_ISO_8859_2
           
static java.lang.String ENCODING_ISO_8859_3
           
static java.lang.String ENCODING_ISO_8859_4
           
static java.lang.String ENCODING_ISO_8859_5
           
static java.lang.String ENCODING_ISO_8859_6
           
static java.lang.String ENCODING_ISO_8859_7
           
static java.lang.String ENCODING_ISO_8859_8
           
static java.lang.String ENCODING_ISO_8859_9
           
static java.lang.String ENCODING_Shift_JIS
           
static java.lang.String ENCODING_UTF_16
           
static java.lang.String ENCODING_UTF_8
           
 
Constructor Summary
Document()
           
Document(MutableNode root)
          Reset the current document root
 
Method Summary
 NodeFactory getNodeFactory()
           
 MutableNode getRoot()
           
 void setEncoding(java.lang.String encoding)
          Set the document encoding, use the ENCODING_... constant for this
 void setHeaderNode(FastVector v)
          Reset the comment header node, this is a vector of SimpleNode
 void setIndentPrefix(java.lang.String prefix)
          Reset the prefix for node tabulation
 void setNodeFactory(NodeFactory nf)
          Reset the node factory
 void setRoot(MutableNode root)
           
 void setStandalone(boolean standalone)
          standalone mode
 void setXmlVersion(int maj, int min)
          Reset the XML version, by default 1.0
 void write(java.io.OutputStream out)
          Write the document content in out. out is automatically closed at end
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODING_UTF_8

public static java.lang.String ENCODING_UTF_8

ENCODING_UTF_16

public static java.lang.String ENCODING_UTF_16

ENCODING_ISO_10646_UCS_2

public static java.lang.String ENCODING_ISO_10646_UCS_2

ENCODING_ISO_10646_UCS_4

public static java.lang.String ENCODING_ISO_10646_UCS_4

ENCODING_ISO_8859_1

public static java.lang.String ENCODING_ISO_8859_1

ENCODING_ISO_8859_2

public static java.lang.String ENCODING_ISO_8859_2

ENCODING_ISO_8859_3

public static java.lang.String ENCODING_ISO_8859_3

ENCODING_ISO_8859_4

public static java.lang.String ENCODING_ISO_8859_4

ENCODING_ISO_8859_5

public static java.lang.String ENCODING_ISO_8859_5

ENCODING_ISO_8859_6

public static java.lang.String ENCODING_ISO_8859_6

ENCODING_ISO_8859_7

public static java.lang.String ENCODING_ISO_8859_7

ENCODING_ISO_8859_8

public static java.lang.String ENCODING_ISO_8859_8

ENCODING_ISO_8859_9

public static java.lang.String ENCODING_ISO_8859_9

ENCODING_ISO_2022_JP

public static java.lang.String ENCODING_ISO_2022_JP

ENCODING_Shift_JIS

public static java.lang.String ENCODING_Shift_JIS

ENCODING_EUC_JP

public static java.lang.String ENCODING_EUC_JP
Constructor Detail

Document

public Document()

Document

public Document(MutableNode root)
Reset the current document root

Method Detail

getNodeFactory

public NodeFactory getNodeFactory()
Returns:
the current node factory

setNodeFactory

public void setNodeFactory(NodeFactory nf)
Reset the node factory


setRoot

public void setRoot(MutableNode root)

getRoot

public MutableNode getRoot()
Returns:
the document root node

write

public void write(java.io.OutputStream out)
           throws java.io.IOException
Write the document content in out. out is automatically closed at end

java.io.IOException

setIndentPrefix

public void setIndentPrefix(java.lang.String prefix)
Reset the prefix for node tabulation


setXmlVersion

public void setXmlVersion(int maj,
                          int min)
Reset the XML version, by default 1.0


setEncoding

public void setEncoding(java.lang.String encoding)
Set the document encoding, use the ENCODING_... constant for this


setStandalone

public void setStandalone(boolean standalone)
standalone mode


setHeaderNode

public void setHeaderNode(FastVector v)
Reset the comment header node, this is a vector of SimpleNode