API16

JXMLElement/data

< API16:JXMLElement

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

LEGACY - Gets the element 'data'.



Syntax

data()


Returns

string

Defined in

libraries/joomla/utilities/xmlelement.php

Importing

jimport( 'joomla.utilities.xmlelement' );

Source Body

public function data()
{
        return (string)$this;
}



Examples

Code Examples

Get the element data

demo.xml

<jdoc>
	<doku kategory="Info">Wiki</doku>
</jdoc>
<?php

$xml = JFactory::getXML('demo.xml');

echo $xml->doku->data();

/* Better: */
echo $xml->doku;

Ausgabe:

Wiki

Elkuku 11:14, 14 January 2011 (CST) Edit comment
Advertisement