Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. CDATA sections are used a lot when specifying file paths and locations to ensure all characters in the path and file name are interpreted correctly:

    Code Block
    <wms:url><![CDATA[http://services.land.vic.gov.au/catalogue/publicproxy/guest/dv_geoserver/wms]]></wms:url>

    Or when setting filters:

    Code Block
    <filter><![CDATA[plan_code <> 0]]></filter>
    

     

     

  2. CDATA sections begin with the string

    Code Block
    <![CDATA[



  3. CDATA sections end with the string 

    Code Block
     ]]>



  4. An alternative to using CDATA sections is to use the markup characters to get the resulting character you need. However this can get messy, using CDATA sections makes your XML files much more readable and reduces the likelihood of mistakes. 

    For example, the same filter parameter give given in Step 1 can be written as:

    Code Block
    <filter>plan_code &lt;&gt; 0</filter>
    

...