CodeExample:4d3084f89e0ff From Joomla! Documentation Revision as of 17:17, 14 January 2011 by Elkuku (talk | contribs) (missing title)(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff) Get the attribute of an element demo.xml <jdoc> <doku kategory="Info">Wiki</doku> </jdoc> <?php $xml = JFactory::getXML('demo.xml'); echo $xml->doku->getAttribute('kategory'); /* Better: */ echo $xml->doku->attributes()->kategory; Output: Info Elkuku 11:16, 14 January 2011 (CST) Edit comment Categories: Pages using deprecated source tagsJXMLElementGetAttributeCodeExampleMethodExample
demo.xml
Output: