# Class CMLWriter

java.lang.Object
org.jmol.adapter.writers.CMLWriter

All Implemented Interfaces:
  `JmolWriter`

Direct Known Subclasses:
  `CDXMLWriter`

public class CMLWriter extends Object implements JmolWriter
An XCrysDen XSF writer see http://www.xcrysden.org/doc/XSF.html

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`addBonds`
`protected boolean`
`allTrajectories`
`protected int`
`atomsMax`
`protected boolean`
`doTransform`
`protected OC`
`oc`
`protected Viewer`
`vwr`

## Constructor Summary

Constructors
Constructor
Description
`CMLWriter()`

## Method Summary

Modifier and Type
Method
Description
`protected static void`
`addAttribute(SB sb, String key, String val)`
`protected static void`
`addAttributes(SB sb, String[] attributes)`
`protected static void`
`appendEmptyTag(SB sb, String name, String[] attributes)`
`protected static void`
`closeTag(SB sb, String name)`
`static void`
`openDocument(SB sb)`
`protected static void`
`openTag(SB sb, String name)`
`void`
`set(Viewer viewer, OC out, Object[] data)`
`protected static void`
`startOpenTag(SB sb, String name)`
`protected static void`
`terminateEmptyTag(SB sb)`
`protected static void`
`terminateTag(SB sb)`
`String`
`toString()`
`String`
`write(BS bs)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### vwr

protected Viewer vwr

### oc

protected OC oc

### atomsMax

protected int atomsMax

### addBonds

protected boolean addBonds

### doTransform

protected boolean doTransform

### allTrajectories

protected boolean allTrajectories

## Constructor Details

### CMLWriter

public CMLWriter()

## Method Details

### set

public void set(Viewer viewer, OC out, Object[] data)

Specified by:
  `set` in interface `JmolWriter`

### write

public String write(BS bs)

Specified by:
  `write` in interface `JmolWriter`

### openDocument

public static void openDocument(SB sb)

### openTag

protected static void openTag(SB sb, String name)

### startOpenTag

protected static void startOpenTag(SB sb, String name)

### terminateTag

protected static void terminateTag(SB sb)

### terminateEmptyTag

protected static void terminateEmptyTag(SB sb)

### appendEmptyTag

protected static void appendEmptyTag(SB sb, String name, String[] attributes)

### addAttributes

protected static void addAttributes(SB sb, String[] attributes)

### addAttribute

protected static void addAttribute(SB sb, String key, String val)

### closeTag

protected static void closeTag(SB sb, String name)

### toString

public String toString()

Overrides:
  `toString` in class `Object`