views:

5

answers:

0

Hello guys, I am trying to add some good php snippets for all the functions available on the online reference and I just finished writing a script to automate that task ( and it's still loading and making me the xml files for snippets ) but there is a problem with the generated snippets xml files that I can't figure out. Whenever I add one of the files to ~/gnome2/gedit/snippets or just import it from the editor itself. All the snippets go blank including those of PHP.
Here is a sample of a generated file and I hope you can spot the problem.

<?xml version='1.0' encoding='utf-8'?>
    <snippets language="php">
          <snippet>
            <text>strlen(${1: string $string }); ${0:#Return : int}</text>
            <tag>str</tag>
            <description>Get string length :  The length of the string on success, and 0 if the string is empty. </description>
          </snippet>

          <snippet>
            <text>strcmp(${1: string $str1 },${2: string $str2 }); ${0:#Return : int}</text>
            <tag>str</tag>
            <description>Binary safe string comparison :  Returns &lt; 0 if str1 is less than str2; &gt; 0 if str1 is greater than str2, and 0 if they are equal. </description>
          </snippet>

          <snippet>
            <text>strncmp(${1: string $str1 },${2: string $str2 },${3: int $len }); ${0:#Return : int}</text>
            <tag>str</tag>
            <description>Binary safe string comparison of the first n characters :  Returns &lt; 0 if str1 is less than str2; &gt; 0 if str1 is greater than str2, and 0 if they are equal. </description>
          </snippet>

          <snippet>
            <text>strcasecmp(${1: string $str1 },${2: string $str2 }); ${0:#Return : int}</text>
            <tag>str</tag>
            <description>Binary safe case-insensitive string comparison :  Returns &lt; 0 if str1 is less than str2; &gt; 0 if str1 is greater than str2, and 0 if they are equal. </description>
          </snippet>

          <snippet>
            <text>strncasecmp(${1: string $str1 },${2: string $str2 },${3: int $len }); ${0:#Return : int}</text>
            <tag>str</tag>
            <description>Binary safe case-insensitive string comparison of the first n characters :  Returns &lt; 0 if str1 is less than str2; &gt; 0 if str1 is greater than str2, and 0 if they are equal. </description>
          </snippet>

          <snippet>
            <text>each(${1: array &$array }); ${0:#Return : array}</text>
            <tag>eac</tag>
            <description>Return the current key and value pair from an array and advance the array cursor :  Returns the current key and value pair from the array array. This pair is returned in a four-element array, with the keys 0, 1, key, and value. Elements 0 and key contain the key name of the array element, and 1 and value contain the data. </description>
          </snippet>

          <snippet>
            <text>define(${1: string $name },${2: mixed $value },${3: bool $case_insensitive = false }); ${0:#Return : bool}</text>
            <tag>def</tag>
            <description>Defines a named constant :  Returns TRUE on success or FALSE on failure. </description>
          </snippet>

          <snippet>
            <text>defined(${1: string $name }); ${0:#Return : bool}</text>
            <tag>def</tag>
            <description>Checks whether a given named constant exists :  Returns TRUE if the named constant given by name has been defined, FALSE otherwise. </description>
          </snippet>
        </snippets>