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

## org.encog.parse.tags.write
Class WriteTags

    java.lang.Object
      org.encog.parse.tags.write.WriteTags

Direct Known Subclasses:
  WriteXML

    public class WriteTags

extends Object

Class used to write out tags, such as XML or HTML.

Author:
  jheaton

Constructor Summary
`WriteTags(OutputStream output)` Construct an object to write tags.

Method Summary
`void` | `addAttribute(String name, String value)` Add an attribute to be written with the next tag.
`void` | `addCDATA(String text)` Add CDATA to the output stream.
`void` | `addProperty(String name, double d)` Add a property as a double.
`void` | `addProperty(String name, double[] array, int len)` Write an array as a property.
`void` | `addProperty(String name, int i)` Add a property as an integer.
`void` | `addProperty(String name, int[] array, int len)` Write an array as a property.
`void` | `addProperty(String name, String str)` Add a property as a string.
`void` | `addText(String text)` Add text.
`void` | `beginDocument()` Called to begin the document.
`void` | `beginTag(String name)` Begin a tag with the specified name.
`void` | `close()` Close this object.
`void` | `endDocument()` End the document.
`void` | `endTag()` End the current tag.
`void` | `endTag(String name)` End a tag, require that we are ending the specified tag.

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

Constructor Detail

### WriteTags

    public WriteTags(OutputStream output)

  Construct an object to write tags.

  Parameters:
    `output` - THe output stream.

Method Detail

### addAttribute

    public void addAttribute(String name,
                             String value)

  Add an attribute to be written with the next tag.

  Parameters:
    `name` - The name of the attribute.
    `value` - The value of the attribute.

### addCDATA

    public void addCDATA(String text)

  Add CDATA to the output stream. XML allows a large block of unformatted text to be added as a CDATA tag.

  Parameters:
    `text` - The text to add.

### addProperty

    public void addProperty(String name,
                            double d)

  Add a property as a double. A property is a value enclosed in two tags.

  Parameters:
    `name` - The name of the enclosing tags.
    `d` - The value to store.

### addProperty

    public void addProperty(String name,
                            int i)

  Add a property as an integer. A property is a value enclosed in two tags.

  Parameters:
    `name` - The name of the enclosing tags.
    `i` - The value to store.

### addProperty

    public void addProperty(String name,
                            String str)

  Add a property as a string. A property is a value enclosed in two tags.

  Parameters:
    `name` - The name of the enclosing tags.
    `str` - The value to store.

### addProperty

    public void addProperty(String name,
                            double[] array,
                            int len)

  Write an array as a property.

  Parameters:
    `name` - The name of the property.
    `array` - The array to write.
    `len` - The length of the array to write.

### addProperty

    public void addProperty(String name,
                            int[] array,
                            int len)

  Write an array as a property.

  Parameters:
    `name` - The name of the property.
    `array` - The array to write.
    `len` - The length of the array to write.

### addText

    public void addText(String text)

  Add text.

  Parameters:
    `text` - The text to add.

### beginDocument

    public void beginDocument()

  Called to begin the document.

### beginTag

    public void beginTag(String name)

  Begin a tag with the specified name.

  Parameters:
    `name` - The tag to begin.

### close

    public void close()

  Close this object.

### endDocument

    public void endDocument()

  End the document.

### endTag

    public void endTag()

  End the current tag.

### endTag

    public void endTag(String name)

  End a tag, require that we are ending the specified tag.

  Parameters:
    `name` - The tag to be ending.

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 © 2012. All Rights Reserved.