Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nu.xom.canonical
Class Canonicalizer

    Object
      nu.xom.canonical.Canonicalizer

public class Canonicalizer
extends Object

Writes XML in the format specified by Canonical XML Version 1.0.

Only complete documents can be canonicalized. Document subset canonicalization is not yet supported.

Version:
  1.0b7
Author:
  Elliotte Rusty Harold

Constructor Summary
`Canonicalizer(OutputStream out)` Creates a `Canonicalizer` that outputs a canonical XML document with comments.
`Canonicalizer(OutputStream out, boolean withComments)` Creates a `Canonicalizer` that outputs a canonical XML document with or without comments.

Method Summary
`void` | `write(Document doc)` Serializes a document onto the output stream using the canonical XML algorithm.

Methods inherited from class Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Canonicalizer

    public Canonicalizer(OutputStream out)

  Creates a `Canonicalizer` that outputs a canonical XML document with comments.

Parameters:
  `out` - the output stream the document is written onto

### Canonicalizer

    public Canonicalizer(OutputStream out,
                         boolean withComments)

  Creates a `Canonicalizer` that outputs a canonical XML document with or without comments.

Parameters:
  `out` - the output stream the document is written onto
  `withComments` - true if comments should be included in the output, false otherwise

Method Detail

### write

    public final void write(Document doc)
                     throws IOException

  Serializes a document onto the output stream using the canonical XML algorithm.

  Parameters:
    `doc` - the document to serialize
  Throws:
    `IOException` - if the underlying `OutputStream` encounters an I/O error

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2002-2004 Elliotte Rusty Harold
elharo@metalab.unc.edu