Hello, I need create a Snippet for CMS Joomla! and this is a XML, but I get a error:
[code]
<![CDATA[
Error parsing snippet xml: Error reading end tag.
How fix it?
Thanks!
Hello, I need create a Snippet for CMS Joomla! and this is a XML, but I get a error:
[code]
<![CDATA[
Error parsing snippet xml: Error reading end tag.
How fix it?
Thanks!
The problem is the XML parser sees the [size=85]]]>[/size] in your snippet code and then closes the [size=85]<![CDATA[[/b][/size] section. So your snippet file is actually being read like this:
[size=85][/size]<![CDATA[[/b]
<?xml version="1.0" encoding="utf-8"?> ** ]]>I had a similar problem, but I fixed it by inserting a Sublime Text variable into the [size=85]]]>[/size] string in my code. Sublime Text snippet variables begin with a dollar sign character, for example: [size=85]$SELECTION[/size]. I discovered that if you use a snippet variable that isn’t defined, Sublime Text will replace it with an empty string. For example, if you changed your snippet content to the following code, it should solve your problem.
[size=85][/size]<![CDATA[[/b]
<?xml version="1.0" encoding="utf-8"?> ** **]]>**Since the above solution is kind of a hack, you could alternatively use the real variable, [size=85]$SELECTION[/size], as long as your snippet doesn’t actually require any text to be selected. The end result is the same: by using [size=85]]][/size]$SELECTION> in your snippet code, the XML parser won’t have a problem with it, and Sublime Text will replace [size=85]$SELECTION[/size] with whatever text was selected when you triggered the snippet–which should be nothing–thus, the final output would just be [size=85]]]>[/size].