Actions

API16

JXMLElement/data

From Joomla! Documentation

< API16:JXMLElement
Revision as of 17:56, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

LEGACY - Gets the element 'data'.

[Edit Descripton]

Description:JXMLElement/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;
}

[Edit See Also] SeeAlso:JXMLElement/data

Examples

<CodeExamplesForm />

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