jp.ne.mki.wedge.pub.vfunit.util
クラス XmlWriter

java.lang.Object
  上位を拡張 jp.ne.mki.wedge.pub.vfunit.util.XmlWriter

public class XmlWriter
extends java.lang.Object

A sample DOM writer. This sample program illustrates how to traverse a DOM tree in order to print a document that is parsed.


フィールドの概要
protected static boolean DEFAULT_CANONICAL
          Default canonical output (false).
protected static boolean DEFAULT_DYNAMIC_VALIDATION
          Default dynamic validation support (false).
protected static boolean DEFAULT_GENERATE_SYNTHETIC_ANNOTATIONS
          Default generate synthetic schema annotations (false).
protected static boolean DEFAULT_HONOUR_ALL_SCHEMA_LOCATIONS
          Default honour all schema locations (false).
protected static boolean DEFAULT_LOAD_EXTERNAL_DTD
          Default load external DTD (true).
protected static boolean DEFAULT_NAMESPACES
          Default namespaces support (true).
protected static java.lang.String DEFAULT_PARSER_NAME
          Default parser name.
protected static boolean DEFAULT_SCHEMA_FULL_CHECKING
          Default Schema full checking support (false).
protected static boolean DEFAULT_SCHEMA_VALIDATION
          Default Schema validation support (false).
protected static boolean DEFAULT_VALIDATE_ANNOTATIONS
          Default validate schema annotations (false).
protected static boolean DEFAULT_VALIDATION
          Default validation support (false).
protected static boolean DEFAULT_XINCLUDE
          Default XInclude processing support (false).
protected static boolean DEFAULT_XINCLUDE_FIXUP_BASE_URIS
          Default XInclude fixup base URIs support (true).
protected static boolean DEFAULT_XINCLUDE_FIXUP_LANGUAGE
          Default XInclude fixup language support (true).
protected static java.lang.String DYNAMIC_VALIDATION_FEATURE_ID
          Dynamic validation feature id (http://apache.org/xml/features/validation/dynamic).
protected  boolean fCanonical
          Canonical output.
protected  java.io.PrintWriter fOut
          Print writer.
protected  boolean fXML11
          Processing XML 1.1 document.
protected static java.lang.String GENERATE_SYNTHETIC_ANNOTATIONS_ID
          Generate synthetic schema annotations feature id (http://apache.org/xml/features/generate-synthetic-annotations).
protected static java.lang.String HONOUR_ALL_SCHEMA_LOCATIONS_ID
          Honour all schema locations feature id (http://apache.org/xml/features/honour-all-schemaLocations).
protected static java.lang.String LOAD_EXTERNAL_DTD_FEATURE_ID
          Load external DTD feature id (http://apache.org/xml/features/nonvalidating/load-external-dtd).
protected static java.lang.String NAMESPACES_FEATURE_ID
          Namespaces feature id (http://xml.org/sax/features/namespaces).
protected static java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID
          Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking).
protected static java.lang.String SCHEMA_VALIDATION_FEATURE_ID
          Schema validation feature id (http://apache.org/xml/features/validation/schema).
protected static java.lang.String VALIDATE_ANNOTATIONS_ID
          Validate schema annotations feature id (http://apache.org/xml/features/validate-annotations).
protected static java.lang.String VALIDATION_FEATURE_ID
          Validation feature id (http://xml.org/sax/features/validation).
protected static java.lang.String XINCLUDE_FEATURE_ID
          XInclude feature id (http://apache.org/xml/features/xinclude).
protected static java.lang.String XINCLUDE_FIXUP_BASE_URIS_FEATURE_ID
          XInclude fixup base URIs feature id (http://apache.org/xml/features/xinclude/fixup-base-uris).
protected static java.lang.String XINCLUDE_FIXUP_LANGUAGE_FEATURE_ID
          XInclude fixup language feature id (http://apache.org/xml/features/xinclude/fixup-language).
 
コンストラクタの概要
XmlWriter()
          Default constructor.
XmlWriter(boolean canonical)
           
 
メソッドの概要
protected  void normalizeAndPrint(char c, boolean isAttValue)
          Normalizes and print the given character.
protected  void normalizeAndPrint(java.lang.String s, boolean isAttValue)
          Normalizes and prints the given string.
 void setCanonical(boolean canonical)
          Sets whether output is canonical.
 void setOutput(java.io.OutputStream stream, java.lang.String encoding)
          Sets the output stream for printing.
 void setOutput(java.io.Writer writer)
          Sets the output writer.
protected  org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
          Returns a sorted list of attributes.
 void write(org.w3c.dom.Node node)
          Writes the specified node, recursively.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

NAMESPACES_FEATURE_ID

protected static final java.lang.String NAMESPACES_FEATURE_ID
Namespaces feature id (http://xml.org/sax/features/namespaces).

関連項目:
定数フィールド値

VALIDATION_FEATURE_ID

protected static final java.lang.String VALIDATION_FEATURE_ID
Validation feature id (http://xml.org/sax/features/validation).

関連項目:
定数フィールド値

SCHEMA_VALIDATION_FEATURE_ID

protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id (http://apache.org/xml/features/validation/schema).

関連項目:
定数フィールド値

SCHEMA_FULL_CHECKING_FEATURE_ID

protected static final java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID
Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking).

関連項目:
定数フィールド値

HONOUR_ALL_SCHEMA_LOCATIONS_ID

protected static final java.lang.String HONOUR_ALL_SCHEMA_LOCATIONS_ID
Honour all schema locations feature id (http://apache.org/xml/features/honour-all-schemaLocations).

関連項目:
定数フィールド値

VALIDATE_ANNOTATIONS_ID

protected static final java.lang.String VALIDATE_ANNOTATIONS_ID
Validate schema annotations feature id (http://apache.org/xml/features/validate-annotations).

関連項目:
定数フィールド値

GENERATE_SYNTHETIC_ANNOTATIONS_ID

protected static final java.lang.String GENERATE_SYNTHETIC_ANNOTATIONS_ID
Generate synthetic schema annotations feature id (http://apache.org/xml/features/generate-synthetic-annotations).

関連項目:
定数フィールド値

DYNAMIC_VALIDATION_FEATURE_ID

protected static final java.lang.String DYNAMIC_VALIDATION_FEATURE_ID
Dynamic validation feature id (http://apache.org/xml/features/validation/dynamic).

関連項目:
定数フィールド値

LOAD_EXTERNAL_DTD_FEATURE_ID

protected static final java.lang.String LOAD_EXTERNAL_DTD_FEATURE_ID
Load external DTD feature id (http://apache.org/xml/features/nonvalidating/load-external-dtd).

関連項目:
定数フィールド値

XINCLUDE_FEATURE_ID

protected static final java.lang.String XINCLUDE_FEATURE_ID
XInclude feature id (http://apache.org/xml/features/xinclude).

関連項目:
定数フィールド値

XINCLUDE_FIXUP_BASE_URIS_FEATURE_ID

protected static final java.lang.String XINCLUDE_FIXUP_BASE_URIS_FEATURE_ID
XInclude fixup base URIs feature id (http://apache.org/xml/features/xinclude/fixup-base-uris).

関連項目:
定数フィールド値

XINCLUDE_FIXUP_LANGUAGE_FEATURE_ID

protected static final java.lang.String XINCLUDE_FIXUP_LANGUAGE_FEATURE_ID
XInclude fixup language feature id (http://apache.org/xml/features/xinclude/fixup-language).

関連項目:
定数フィールド値

DEFAULT_PARSER_NAME

protected static final java.lang.String DEFAULT_PARSER_NAME
Default parser name.

関連項目:
定数フィールド値

DEFAULT_NAMESPACES

protected static final boolean DEFAULT_NAMESPACES
Default namespaces support (true).

関連項目:
定数フィールド値

DEFAULT_VALIDATION

protected static final boolean DEFAULT_VALIDATION
Default validation support (false).

関連項目:
定数フィールド値

DEFAULT_LOAD_EXTERNAL_DTD

protected static final boolean DEFAULT_LOAD_EXTERNAL_DTD
Default load external DTD (true).

関連項目:
定数フィールド値

DEFAULT_SCHEMA_VALIDATION

protected static final boolean DEFAULT_SCHEMA_VALIDATION
Default Schema validation support (false).

関連項目:
定数フィールド値

DEFAULT_SCHEMA_FULL_CHECKING

protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING
Default Schema full checking support (false).

関連項目:
定数フィールド値

DEFAULT_HONOUR_ALL_SCHEMA_LOCATIONS

protected static final boolean DEFAULT_HONOUR_ALL_SCHEMA_LOCATIONS
Default honour all schema locations (false).

関連項目:
定数フィールド値

DEFAULT_VALIDATE_ANNOTATIONS

protected static final boolean DEFAULT_VALIDATE_ANNOTATIONS
Default validate schema annotations (false).

関連項目:
定数フィールド値

DEFAULT_GENERATE_SYNTHETIC_ANNOTATIONS

protected static final boolean DEFAULT_GENERATE_SYNTHETIC_ANNOTATIONS
Default generate synthetic schema annotations (false).

関連項目:
定数フィールド値

DEFAULT_DYNAMIC_VALIDATION

protected static final boolean DEFAULT_DYNAMIC_VALIDATION
Default dynamic validation support (false).

関連項目:
定数フィールド値

DEFAULT_XINCLUDE

protected static final boolean DEFAULT_XINCLUDE
Default XInclude processing support (false).

関連項目:
定数フィールド値

DEFAULT_XINCLUDE_FIXUP_BASE_URIS

protected static final boolean DEFAULT_XINCLUDE_FIXUP_BASE_URIS
Default XInclude fixup base URIs support (true).

関連項目:
定数フィールド値

DEFAULT_XINCLUDE_FIXUP_LANGUAGE

protected static final boolean DEFAULT_XINCLUDE_FIXUP_LANGUAGE
Default XInclude fixup language support (true).

関連項目:
定数フィールド値

DEFAULT_CANONICAL

protected static final boolean DEFAULT_CANONICAL
Default canonical output (false).

関連項目:
定数フィールド値

fOut

protected java.io.PrintWriter fOut
Print writer.


fCanonical

protected boolean fCanonical
Canonical output.


fXML11

protected boolean fXML11
Processing XML 1.1 document.

コンストラクタの詳細

XmlWriter

public XmlWriter()
Default constructor.


XmlWriter

public XmlWriter(boolean canonical)
メソッドの詳細

setCanonical

public void setCanonical(boolean canonical)
Sets whether output is canonical.


setOutput

public void setOutput(java.io.OutputStream stream,
                      java.lang.String encoding)
               throws java.io.UnsupportedEncodingException
Sets the output stream for printing.

例外:
java.io.UnsupportedEncodingException

setOutput

public void setOutput(java.io.Writer writer)
Sets the output writer.


write

public void write(org.w3c.dom.Node node)
Writes the specified node, recursively.


sortAttributes

protected org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
Returns a sorted list of attributes.


normalizeAndPrint

protected void normalizeAndPrint(java.lang.String s,
                                 boolean isAttValue)
Normalizes and prints the given string.


normalizeAndPrint

protected void normalizeAndPrint(char c,
                                 boolean isAttValue)
Normalizes and print the given character.