# A classe XMLWriter

(PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL xmlwriter >= 0.1.0)

## Introdução

## Resumo da classe

class XMLWriter {
/* Métodos */
public function endAttribute(): bool
public function endCdata(): bool
public function endComment(): bool
public function endDocument(): bool
public function endDtd(): bool
public function endDtdAttlist(): bool
public function endDtdElement(): bool
public function endDtdEntity(): bool
public function endElement(): bool
public function endPi(): bool
public function flush(bool `$empty` = `true`): string|int
public function fullEndElement(): bool
public function openMemory(): bool
public function openUri(string `$uri`): bool
public function outputMemory(bool `$flush` = `true`): string
public function setIndent(bool `$enable`): bool
public function setIndentString(string `$indentation`): bool
public function startAttribute(string `$name`): bool
public function startAttributeNs(?string `$prefix`, string `$name`, ?string `$namespace`): bool
public function startCdata(): bool
public function startComment(): bool
public function startDocument(?string `$version` = "1.0", ?string `$encoding` = `null`, ?string `$standalone` = `null`): bool
public function startDtd(string `$qualifiedName`, ?string `$publicId` = `null`, ?string `$systemId` = `null`): bool
public function startDtdAttlist(string `$name`): bool
public function startDtdElement(string `$qualifiedName`): bool
public function startDtdEntity(string `$name`, bool `$isParam`): bool
public function startElement(string `$name`): bool
public function startElementNs(?string `$prefix`, string `$name`, ?string `$namespace`): bool
public function startPi(string `$target`): bool
public function text(string `$content`): bool
public static function toMemory(): static
public static function toStream(resource `$stream`): static
public static function toUri(string `$uri`): static
public function writeAttribute(string `$name`, string `$value`): bool
public function writeAttributeNs(
?string `$prefix`,
string `$name`,
?string `$namespace`,
string `$value`
): bool
public function writeCdata(string `$content`): bool
public function writeComment(string `$content`): bool
public function writeDtd(
string `$name`,
?string `$publicId` = `null`,
?string `$systemId` = `null`,
?string `$content` = `null`
): bool
public function writeDtdAttlist(string `$name`, string `$content`): bool
public function writeDtdElement(string `$name`, string `$content`): bool
public function writeDtdEntity(
string `$name`,
string `$content`,
bool `$isParam` = `false`,
?string `$publicId` = `null`,
?string `$systemId` = `null`,
?string `$notationData` = `null`
): bool
public function writeElement(string `$name`, ?string `$content` = `null`): bool
public function writeElementNs(
?string `$prefix`,
string `$name`,
?string `$namespace`,
?string `$content` = `null`
): bool
public function writePi(string `$target`, string `$content`): bool
public function writeRaw(string `$content`): bool
}

## Índice

- XMLWriter::endAttribute — Termina o atributo
- XMLWriter::endCdata — Termina o CDATA atual
- XMLWriter::endComment — Termina o comentário
- XMLWriter::endDocument — Termina o documento atual
- XMLWriter::endDtd — Termina o DTD atual
- XMLWriter::endDtdAttlist — Termina a a lista de atributos do DTD atual
- XMLWriter::endDtdElement — Termina o elemento DTD atual
- XMLWriter::endDtdEntity — Encerra a entidade DTD atual
- XMLWriter::endElement — Termina o elemento atual
- XMLWriter::endPi — Encerra a instrução de processamento atual
- XMLWriter::flush — Limpa o buffer atual
- XMLWriter::fullEndElement — Termina o elemento atual
- XMLWriter::openMemory — Cria um novo xmlwriter usando memória para saída de string
- XMLWriter::openUri — Cria um novo xmlwriter usando o URI de origem para saída
- XMLWriter::outputMemory — Retorna o buffer atual
- XMLWriter::setIndent — Ativa/desativa o recuo
- XMLWriter::setIndentString — Define a string usada para recuo
- XMLWriter::startAttribute — Inicia um atributo
- XMLWriter::startAttributeNs — Inicia um atributo com namespace
- XMLWriter::startCdata — Cria tag de início de CDATA
- XMLWriter::startComment — Cria tag de início de comentário
- XMLWriter::startDocument — Cria tag de documento
- XMLWriter::startDtd — Cria tag DTD inicial
- XMLWriter::startDtdAttlist — Inicia uma lista de atributos DTD
- XMLWriter::startDtdElement — Cria elemento DTD inicial
- XMLWriter::startDtdEntity — Cria entidade DTD inicial
- XMLWriter::startElement — Cria a tag de início de elemento
- XMLWriter::startElementNs — Cria tag de elemento com namespace inicial
- XMLWriter::startPi — Cria tag PI inicial
- XMLWriter::text — Escreve texto
- XMLWriter::toMemory — Cria um novo XMLWriter usando memória para saída de string
- XMLWriter::toStream — Cria um novo XMLWriter usando um fluxo para saída
- XMLWriter::toUri — Cria um novo XMLWriter usando um URI para saída
- XMLWriter::writeAttribute — Escreve atributo completo
- XMLWriter::writeAttributeNs — Escreve atributo com namespace completo
- XMLWriter::writeCdata — Escreve tag CDATA completa
- XMLWriter::writeComment — Escreve tag de comentário completa
- XMLWriter::writeDtd — Escreve tag DTD completa
- XMLWriter::writeDtdAttlist — Escreve a tag de lista de atributos DTD completa
- XMLWriter::writeDtdElement — Escreve a tag completa do elemento DTD
- XMLWriter::writeDtdEntity — Escreve a tag de entidade DTD completa
- XMLWriter::writeElement — Escreve uma tag de elemento completa
- XMLWriter::writeElementNs — Escreve tag de elemento com namespace completo
- XMLWriter::writePi — Escreve uma instrução de processamento
- XMLWriter::writeRaw — Escreve um texto XML bruto

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open