# eric3.XML.XMLWriterBase

Module implementing a base class for all of eric3s XML writers.

### Classes

XMLWriterBase | Class implementing a base class for all of eric3s XML writers.

### Functions

None

## XMLWriterBase

Class implementing a base class for all of eric3s XML writers.

### Derived from

None

### Methods

XMLWriterBase | Constructor
_write | Protected method used to do the real write operation.
escape | Function to escape &, <, and > in a string of data.
writeXML | Public method to write the XML to the file.

### XMLWriterBase (Constructor)

XMLWriterBase(file)

Constructor

file
  open file (like) object for writing

### XMLWriterBase._write

_write(s, newline=1)

Protected method used to do the real write operation.

s
  string to be written to the XML file
newline
  flag indicating a linebreak

### XMLWriterBase.escape

escape(data, attribute=0)

Function to escape &, <, and > in a string of data.

data
  data to be escaped (string)
attribute
  flag indicating escaping is done for an attribute

Returns:
  the escaped data (string)

### XMLWriterBase.writeXML

writeXML()

Public method to write the XML to the file.

Up