downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

XMLWriter::startAttributeNS> <XMLWriter::setIndentString
[edit] Last updated: Tue, 18 Jun 2013

view this page in

XMLWriter::setIndent

xmlwriter_set_indent

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

XMLWriter::setIndent -- xmlwriter_set_indentCambia la sangria de encendida/apagada

Descripción

Estilo orientado a objetos

bool XMLWriter::setIndent ( bool $indent )

Estilo por procedimientos

bool xmlwriter_set_indent ( resource $xmlwriter , bool $indent )

Cambia la sangría a encendida o apagada

Parámetros

xmlwriter

Sólo para llamadas por procedimientos. El resource XMLWriter que está siendo modificado. Este recurso proviene de una llamada a xmlwriter_open_uri() o xmlwriter_open_memory().

indent

Si la sangría está activada.

Valores devueltos

Devuelve TRUE en caso de éxito o FALSE en caso de error.

Ver también



add a note add a note User Contributed Notes XMLWriter::setIndent - [1 notes]
up
0
nemiga at gmail dot com
1 year ago
This param should be used only after openMemory() call:

<?php
$version
= '1.0';
$encoding = 'UTF-8';
$rootName = 'root';

$xml = new XMLWriter();              

$xml->openMemory();
$xml->setIndent(true);
$xml->startDocument($version, $encoding);
$xml->startElement($this->rootName);
// .. add more elements here
$xml->endElement();
echo
$xml->outputMemory();
?>

 
show source | credits | sitemap | contact | advertising | mirror sites