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

## org.apache.jorphan.util
Class XMLBuffer

    java.lang.Object
      org.apache.jorphan.util.XMLBuffer

public class XMLBuffer
extends Object

Provides XML string building methods. Not synchronised.

Constructor Summary
`XMLBuffer()`

Method Summary
`XMLBuffer` | `closeTag(String tagname)` Close top tag from stack.
`XMLBuffer` | `openTag(String tagname)` Open a tag; save on stack.
`XMLBuffer` | `tag(String tagname, String content)` Add a complete tag with content.
`XMLBuffer` | `tag(String tagname, StringBuffer content)` Add a complete tag with content.
`String` | `toString()` Convert the buffer to a string, closing any open tags

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

Constructor Detail

### XMLBuffer

    public XMLBuffer()

Method Detail

### openTag

    public XMLBuffer openTag(String tagname)

  Open a tag; save on stack.

  Parameters:
    `tagname` -
  Returns:
    this

### closeTag

    public XMLBuffer closeTag(String tagname)

  Close top tag from stack.

  Parameters:
    `tagname` -
  Returns:
    this
  Throws:
    `IllegalArgumentException` - if the tag names do not match

### tag

    public XMLBuffer tag(String tagname,
                         String content)

  Add a complete tag with content.

  Parameters:
    `tagname` -
    `content` -
  Returns:
    this

### tag

    public XMLBuffer tag(String tagname,
                         StringBuffer content)

  Add a complete tag with content.

  Parameters:
    `tagname` -
    `content` -
  Returns:
    this

### toString

    public String toString()

  Convert the buffer to a string, closing any open tags

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

Copyright © 1998-2009 Apache Software Foundation. All Rights Reserved.