SimpleXMLElement::__toString
(No hay información de versión disponible, podría estar únicamente en SVN)
SimpleXMLElement::__toString — Returns the string content
Descripción
public string SimpleXMLElement::__toString
( void
)
Returns text content that is directly in this element. Does not return text content that is inside this element's children.
Parámetros
Esta función no tiene parámetros.
Valores devueltos
Returns the string content on success or an empty string on failure.
Ejemplos
Ejemplo #1 Get string content
<?php
$xml = new SimpleXMLElement('<a>1 <b>2 </b>3</a>');
echo $xml;
?>
El resultado del ejemplo sería:
1 3
Ver también
- SimpleXMLElement::asXML() - Retorna un string XML correcto basado en un elemento SimpleXML