spacer Contact Us | Site Map
spacer
 
  
spacer
Next Steps to Your Content Management System Take a QuickTour Visit the InfoCenter Schedule a Demo Get It Now

Developer Resources
spacer
Visual Editing
Developer Environment
Connector Gateway Tools
Code Samples
spacer


Building XML Output

Whether its an RSS feed or a customized XML feed - creating an output template that contains XML is straightforward using the CrownPeak CMS development environment.  In practice, it's exactly like creating HTML output, where you use your desired XML tags instead of HTML tags.  The built in escapeItem API function makes sure that your content is properly escaped.  The following code fragment shows several top level fields and a repeating field:

    <name><%= content.escapeItem("name") %></name>
    <subtitle><%= content.escapeItem("subtitle") %></subtitle>
    <category>
      <% set list = content.createList("categories")
            do while list.nextEntry() %>
              <category_name><%= list.escapeItem("categories") %></category_name>
      <% loop %>
    </category>
    <class><%= content.escapeItem("class") %></class>
    <summary><%= content.escapeItem("summary") %></summary>
    <description><%= content.escapeItem("description") %></description>

dots
spacer © 2008 CrownPeak Technology. All rights reserved. Toll Free Number: (800) 887-1944
spacer Site Map | rss_xml