API15

Difference between revisions of "JTable/toXML"

From Joomla! Documentation

< API15:JTable
(New page: ===Description=== Export item list to xml <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> ...)
 
m (removing red link to edit, no existant pages)
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JTable/toXML|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JTable/toXML}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 57: Line 57:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JTable/toXML|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JTable/toXML}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 72: Line 72:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API15]]

Revision as of 13:52, 12 May 2013

The "API15" 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[edit]

Export item list to xml

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

toXML($mapKeysToText=false)
Parameter Name Default Value Description
$mapKeysToText false Map foreign keys to text values

Defined in[edit]

libraries/joomla/database/table.php

Importing[edit]

jimport( 'joomla.database.table' );

Source Body[edit]

function toXML( $mapKeysToText=false )
{
        $xml = '<record table="' . $this->_tbl . '"';

        if ($mapKeysToText)
        {
                $xml .= ' mapkeystotext="true"';
        }
        $xml .= '>';
        foreach (get_object_vars( $this ) as $k => $v)
        {
                if (is_array($v) or is_object($v) or $v === NULL)
                {
                        continue;
                }
                if ($k[0] == '_')
                { // internal field
                        continue;
                }
                $xml .= '<' . $k . '><![CDATA[' . $v . ']]></' . $k . '>';
        }
        $xml .= '</record>';

        return $xml;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />