Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











ELEMENT:  <![CDATA[...]]>

Strictly speaking, the <![CDATA[...]]> tag is not part of the WSH XML element. However, it is very useful to tell the XML parser not to parse the contents wrapped inside the <![CDATA[...]]> section. This will prevent the XML parser from failing when the contents contain some XML-reserved characters, such as ampersand (&).

The following sample code cannot be parsed correctly by the XML parser.

<?XML version="1.0" ?>
<!-- Filename: demo.wsf-->
<package>
  <job>
    <script type="text/vbscript">
      WScript.Echo "Hello " & "World!"
    </script>
  </job>
</package>

The following sample code illustrates how the <![CDATA[...]]> tag can be used to fixed the erroneous code shown above.

<?XML version="1.0" ?>
<!-- Filename: demo.wsf-->
<package>
  <job>
    <script type="text/vbscript">
    <![CDATA[
      WScript.Echo "Hello " & "World!"
    ]]>
    </script>
  </job>
</package>

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information