ToHeader Joomla plugin - Invalid XML
Facts - Php
Friday, 08 August 2008 11:48
Article Index
ToHeader Joomla plugin
Using the ToHeader Plugin
Download the ToHeader Content Plugin
Question
Invalid XML
Mootools.js disabled
All Pages

Invalid XML

I got the following error message:

Warning: SimpleXMLElement:...Entity: line 4: parse error: Opening and ending tag mismatch: meta line 3 ...

My code is:

<toheader>
<meta name="revisit-after" CONTENT="7 days">
<meta name="aesop" CONTENT="sales">
</toheader>

This means that you did not put valid XML inside the toheader tags. Th meta tags inside the toheader tags are not closed. Change them to the following:

<toheader>
<meta name="revisit-after" CONTENT="7 days"/>
<meta name="aesop" CONTENT="sales"/>
</toheader>

If your code contains javascript then don't forget to put xml comments around the javascript code inside any script tags, see the example on the first page of this article. Even with xml comments around your javascript code do not use the −− operator (decrease with one) inside the toheader tags.