I am using Magento 2.0 I have learned magento2 tutorials(No frills magento2 layout) of alan storm. I have created two XML files. when I run the controller file then give the following error
Warning: simplexml_load_string(): Entity: line 1: parser error : XML declaration allowed only at the start of the document in C:\wamp\www\magentodemo\vendor\magento\framework\View\Model\Layout\Merge.php on line 488
my XML file is :
top-container.xml
<?xml version="1.0" encoding="UTF-8"?>
<container name="top" > </container>
block.xml
<?xml version="1.0" encoding="UTF-8"?>
<referenceContainer name="top">
<block class="Magento\Framework\View\Element\Template" name="pulsestorm_nofrills_chapter2_block1" template="Pulsestorm_Nofrillslayout :: chapter2/block1.phtml">
</block>
</referenceContainer>
file locations are
app
code
namespace
modulename
sample-xml
-top-container.xml
-block.xml
Please suggest me