Collaboration API Documentation

com.filenet.bso.api.util
Class BsoXMLWriter

java.lang.Object
  |
  +--com.filenet.bso.api.util.BsoXMLWriter

public class BsoXMLWriter
extends java.lang.Object

The BsoXMLWriter class provides helper methods to produce well-formed XML output.

See Also:
BsoGenericSAXHandler, BsoXMLBinder, BsoXMLMarshal, BsoXMLUnmarshal, BsoXPathDef

Method Summary
static void beginElement(java.io.BufferedWriter out, java.lang.String name, boolean attributesToFollow)
          Writes out the beginning of an XML element to a BufferedWriter.
static void endAttributes(java.io.BufferedWriter out, boolean endElement)
          If an XML element was begun by calling beginElement(out, name, true), call this to write out the closing part of the begin element tag.
static void endElement(java.io.BufferedWriter out, java.lang.String name)
          Writes an end XML element tag to a BufferedWriter.
static void write(java.io.BufferedWriter out, java.util.List list)
          Writes all objects in a List to a BufferedWriter.
static void write(java.io.BufferedWriter out, java.lang.Object obj)
          Writes an object to a BufferedWriter.
static void write(java.io.BufferedWriter out, java.lang.String line)
          Writes an XML string to a BufferedWriter.
static void writeAttribute(java.io.BufferedWriter out, java.lang.String name, boolean value)
          Writes an XML attribute name and boolean value to a BufferedWriter.
static void writeAttribute(java.io.BufferedWriter out, java.lang.String name, java.lang.Integer value)
          Writes an XML attribute name and integer value to a BufferedWriter.
static void writeAttribute(java.io.BufferedWriter out, java.lang.String name, java.lang.String value)
          Writes an XML attribute name and string value to a BufferedWriter.
static void writeElement(java.io.BufferedWriter out, java.lang.String name, boolean value)
          Writes a simple XML boolean element to a BufferedWriter.
static void writeElement(java.io.BufferedWriter out, java.lang.String name, java.lang.Integer value)
          Writes a simple XML integer element to a BufferedWriter.
static void writeElement(java.io.BufferedWriter out, java.lang.String name, java.lang.String value)
          Writes a simple XML element to a BufferedWriter.
static void writeElementIfAny(java.io.BufferedWriter out, java.lang.String name, java.lang.String value)
          Writes a simple XML element to a BufferedWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

write

public static void write(java.io.BufferedWriter out,
                         java.lang.String line)
Writes an XML string to a BufferedWriter.

Parameters:
out - An output stream object.

line - A String containing XML content.

write

public static void write(java.io.BufferedWriter out,
                         java.util.List list)
Writes all objects in a List to a BufferedWriter.

Parameters:
out - An output stream object.

list - A List containing objects that implement the BsoXMLMarshal interface.

write

public static void write(java.io.BufferedWriter out,
                         java.lang.Object obj)
Writes an object to a BufferedWriter.

Parameters:
out - An output stream object.

obj - An Object that implements the BsoXMLMarshal interface.

writeElementIfAny

public static void writeElementIfAny(java.io.BufferedWriter out,
                                     java.lang.String name,
                                     java.lang.String value)
Writes a simple XML element to a BufferedWriter. This method does not output the element if the value parameter is null.

Parameters:
out - An output stream object.

name - The name of the XML element.

value - The value of the XML element.

writeElement

public static void writeElement(java.io.BufferedWriter out,
                                java.lang.String name,
                                java.lang.String value)
Writes a simple XML element to a BufferedWriter. If the value parameter is null, this method closes the element tag.

Parameters:
out - An output stream object.

name - The name of the XML element.

value - The value of the XML element.

writeElement

public static void writeElement(java.io.BufferedWriter out,
                                java.lang.String name,
                                boolean value)
Writes a simple XML boolean element to a BufferedWriter.

Parameters:
out - An output stream object.

name - The name of the XML element.

value - The value of the XML element.

writeElement

public static void writeElement(java.io.BufferedWriter out,
                                java.lang.String name,
                                java.lang.Integer value)
Writes a simple XML integer element to a BufferedWriter.

Parameters:
out - An output stream object.

name - The name of the XML element.

value - The value of the XML element.

beginElement

public static void beginElement(java.io.BufferedWriter out,
                                java.lang.String name,
                                boolean attributesToFollow)
Writes out the beginning of an XML element to a BufferedWriter.

Parameters:
out - An output stream object.

name - The name of the XML element.

attributesToFollow - If true, doesn't write out the closing part of the element tag, leaving room for attributes to be written. You must call endAttributes() to write out the closing part of the begin element tag.

endAttributes

public static void endAttributes(java.io.BufferedWriter out,
                                 boolean endElement)
If an XML element was begun by calling beginElement(out, name, true), call this to write out the closing part of the begin element tag.

Parameters:
out - An output stream object.

endElement - If true, ends the element with a closing slash, "/", to mark that the element has no additional content.

endElement

public static void endElement(java.io.BufferedWriter out,
                              java.lang.String name)
Writes an end XML element tag to a BufferedWriter.

Parameters:
out - An output stream object.

name - The name of the XML element.

writeAttribute

public static void writeAttribute(java.io.BufferedWriter out,
                                  java.lang.String name,
                                  java.lang.String value)
Writes an XML attribute name and string value to a BufferedWriter. If the value parameter is null, this method does not write the attribute to the output stream object.

Parameters:
out - An output stream object.

name - The name of the XML attribute.

value - The value of the XML attribute.

writeAttribute

public static void writeAttribute(java.io.BufferedWriter out,
                                  java.lang.String name,
                                  boolean value)
Writes an XML attribute name and boolean value to a BufferedWriter.

Parameters:
out - An output stream object.

name - The name of the XML attribute.

value - The value of the XML attribute.

writeAttribute

public static void writeAttribute(java.io.BufferedWriter out,
                                  java.lang.String name,
                                  java.lang.Integer value)
Writes an XML attribute name and integer value to a BufferedWriter.

Parameters:
out - An output stream object.

name - The name of the XML attribute.

value - The value of the XML attribute.

Collaboration API Documentation

Copyright © 2002 - 2004 FileNet Corporation. All rights reserved.