See the tests cases for more information about the XML format (/tests/core/DataTable/Renderer.test.php) Or have a look at the API calls examples. Works with recursive DataTable (when a row can be associated with a subDataTable).
Наследование: extends Piwik\DataTable\Renderer
Пример #1
0
    public function testRenderArray4()
    {
        $data = array('c' => array(1, 2, 3, 4), 'e' => array('f' => 'g', 'h' => 'i', 'j' => 'k'));
        $render = new Xml();
        $render->setTable($data);
        $expected = '<?xml version="1.0" encoding="utf-8" ?>
<result>
	<c>
		<row>1</row>
		<row>2</row>
		<row>3</row>
		<row>4</row>
	</c>
	<e>
		<f>g</f>
		<h>i</h>
		<j>k</j>
	</e>
</result>';
        $this->assertEquals($expected, $render->render());
    }