Class XMLWriter
Extends
java.io.FilterWriter.
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
XMLWriter(out)
Creates a writer in the given output stream encoded in UTF-8.
|
Method Attributes | Method Name and Description |
---|---|
write(buffer, offset, length)
Writes the given characters array as the content of the current element.
|
|
writeAttribute(name, value, defaultValue)
Writes the name and the value of an attribute in the tag of the last started element,
except if
value equals defaultValue . |
|
writeBigDecimalAttribute(name, value)
Writes the name and the value of an attribute in the tag of the last started element,
except if
value equals null . |
|
writeBooleanAttribute(name, value, defaultValue)
Writes the name and the boolean value of an attribute in the tag of the last started element,
except if
value equals defaultValue . |
|
writeColorAttribute(name, color)
Writes the name and the color value of an attribute in the tag of the last started element,
except if
value equals null . |
|
Writes an end tag for the given element.
|
|
writeFloatAttribute(name, value, defaultValue)
Writes the name and the float value of an attribute in the tag of the last started element,
except if
value equals defaultValue . |
|
writeIntegerAttribute(name, value, defaultValue)
Writes the name and the integer value of an attribute in the tag of the last started element,
except if
value equals defaultValue . |
|
writeLongAttribute(name, value)
Writes the name and the long value of an attribute in the tag of the last started element,
except if
value equals null . |
|
writeStartElement(element)
Writes a start tag for the given element.
|
|
writeText(text)
Writes the given
text as the content of the current element. |
Class Detail
XMLWriter(out)
Creates a writer in the given output stream encoded in UTF-8.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {StringWriter} out
Method Detail
write(buffer, offset, length)
Writes the given characters array as the content of the current element.
- Parameters:
- {char[]} buffer
- {number} offset
- {number} length
writeAttribute(name, value, defaultValue)
Writes the name and the value of an attribute in the tag of the last started element,
except if
value
equals defaultValue
.
- Parameters:
- {string} name
- {string} value
- {string} defaultValue
writeBigDecimalAttribute(name, value)
Writes the name and the value of an attribute in the tag of the last started element,
except if
value
equals null
.
- Parameters:
- {string} name
- {Big} value
writeBooleanAttribute(name, value, defaultValue)
Writes the name and the boolean value of an attribute in the tag of the last started element,
except if
value
equals defaultValue
.
- Parameters:
- {string} name
- {boolean} value
- {boolean} defaultValue
writeColorAttribute(name, color)
Writes the name and the color value of an attribute in the tag of the last started element,
except if
value
equals null
. The color is written in hexadecimal.
- Parameters:
- {string} name
- {number} color
writeEndElement()
Writes an end tag for the given element.
writeFloatAttribute(name, value, defaultValue)
Writes the name and the float value of an attribute in the tag of the last started element,
except if
value
equals defaultValue
.
- Parameters:
- {string} name
- {number} value
- {number} defaultValue
writeIntegerAttribute(name, value, defaultValue)
Writes the name and the integer value of an attribute in the tag of the last started element,
except if
value
equals defaultValue
.
- Parameters:
- {string} name
- {number} value
- {number} defaultValue
writeLongAttribute(name, value)
Writes the name and the long value of an attribute in the tag of the last started element,
except if
value
equals null
.
- Parameters:
- {string} name
- {number} value
writeStartElement(element)
Writes a start tag for the given element.
- Parameters:
- {string} element
writeText(text)
Writes the given
text
as the content of the current element.
- Parameters:
- {string} text