> Please Create a new “view file"
/components/com_helloworld/views/helloworld/view.xml.php
> We have created an XML file for testing you can create any other format file like JSON
> Please write the PHP code in the file you just created, that you would like to ultimately create your XML file. belolw is our example code
<?php // No direct access to this file defined('_JEXEC') or die('Restricted access'); // import Joomla view library jimport('joomla.application.component.view'); /** * XML View class for the HelloWorld Component */ class HelloWorldViewHelloWorld extends JViewLegacy { // Overwriting JView display method function display($tpl = null) { echo "<?xml version='1.0' encoding='UTF-8'?> <article> <title>How to create a Joomla Component</title> <alias>create-component</alias> </article>"; } }