The XSLTGet tag allows you to retrieve and format structured data and then display it in a Template or Article.


To get content from structured external data into your content, do the following:

  1. Create an Article containing the XSLT formatting.
  2. Create a Template or Article and define the XSLTGet tag using the correct syntax.
  3. Save the Template or Article.
  4. Preview the Template to see if the content displays.
  5. Send a test campaign to verify the content displays.

XSLTGet Syntax

The syntax for XSLTGet is as follows:

%% xsltget url="[URL]"&article_nm=[ARTICLE_NAME]&command=[COMMAND] %%

[URL]  only is enclosed in quotation marks, & between URL and each command.

If the command is improperly formated, the URL cannot be found, or some other error occurs, the command will fail.  When the Get fails, the campaign will not send messages to contacts, and a failure notification will be delivered to the address of the user who initiated the campaign.


The [URL] is the URL to the content (html OR text), [ARTICLE_NAME] is the name of the article containing the XSLT, and [COMMAND] is one or more of the following options:





Uses the defined base URL in place of the default tracking URL.

Example: base_url=http://


Fixes typesetter marks, such as "?" replacing special characters like curly quotes, from content defined by programs such as Word, with the correct or similar characters.  Defaults to 0, not enabled.

Example: fix_quotes=1 (enabled)


Fixes relative URLs in the content, adding protocol and host information to create absolute URLs.  Defaults to 0, not enabled.

Example: fix_relative=1 (enabled)


Grabs the content if the page contains the specified text.  Otherwise, causes the campaign to fail.  

Example: must_contain=[SOME_TEXT]


Grabs the content if the page does not contain the specified text.  Otherwise, causes the campaign to fail.  Especially helpful to ensure the phrase "document not found" does not appear in the content. 

Example: must_not_contain=[SOME_TEXT]


Stops attempting to pull the content if no response is received in the specified amount of time, defined in seconds. 

If a URL "times out" with "cacheget", the system will automatically refresh the cache by going out and obtaining a new copy of the content.  If it does not time out, then content is pulled from an in-memory cache. 

Defaults to 300 seconds, or five minutes.

Example: timeout=[SECONDS]


Wraps the content at the specified character length.  Wrapping occurs on word boundaries and not within quoted text or JavaScript.  It most useful for paginating plain-text.  Defaults to 0, not enabled.

Example: wrap=[NUMBER] (enabled, wrap at every [NUMBER] characters)


REQUIRED - Specifies the content to access.  The URL must be a valid, publicly available page that may easily be opened and examined in your web browser. 

Example: url=http://

article_nm REQUIRED - Specifies the name of the article containing the formatted XSLT.


The following are examples using the commands above. All commands can be combined in any order:

%%xsltget url="http://"&base_url=http://

XSLTGet must_contain:   

%%xsltget url="http://"&must_contain=My%20Site%20Name%%

XSLTGet must_not_contain:   

%%xsltget url="http://"&must_not_contain=500%20Servlet%20Exception%%

Example Article and Result

The XSLTGET Tag references an article that must contain XSLT formatting data.  This article must exist in order for XSLTGET funcationality to work properly.  The XSLT in the article will tell the Template how to format called in from the XML page.

To learn more about using XSLT, go to XSLT Tutorial.

External XML Content

For example, if the XML is:

<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:blogChannel="">    <channel>       <title>Coupons of the Week</title>       <link>http://</link>       <description>Big savings for your preferred products</description>       <pubDate>Mon, 20 May 2013 15:41:04 PDT</pubDate>       <item>         <category>Bakery</category>         <title>Baker's Dozen Doughnuts</title>         <link>http://</link>         <description>All week, get 13 doughnuts for the price of 12</description>         <expDate>01 June 2013</expDate>         <image>http://</image>       </item>    </channel> </rss>

XSLT Article

To create the article:

  1. Go to Content > View Articles
  2. Click Add Article
  3. Enter a Name, for example: XSLT_coupons
  4. In the Body, add the XSLT code.

<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:cns=""> <xsl:output method="html" encoding="windows-1251" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system=""/>    <xsl:template match="/">    <html xmlns="">       <body>         <xsl:apply-templates select="rss/channel" />         <xsl:apply-templates select="rss/channel/item" />      </body>    </html>    </xsl:template>    <xsl:template match="rss/channel">       <b><a href="{link}"><xsl:value-of select="title"/></a></b><br />       <xsl:value-of select="description"/> for the week starting       <xsl:value-of select="pubDate"/><br /><br />    </xsl:template>    <xsl:template match="rss/channel/item">      <a href="{link}"><img src="{image}" width="200" /></a><br />      <b><xsl:value-of select="title"/></b><br/>      <xsl:value-of select="description"/><br /><br />    </xsl:template> </xsl:stylesheet>

  1. Click SAVE.


In the Template, insert the following XSLTGet tag:

%% xsltget article_nm=xslt_coupons&url="http://"&base_url=http:// %%


When you Preview or Deploy the content, the result will be:


Coupons of the Week Big savings for your preferred products for the week starting Mon, 20 May 2013 15:41:04 PDT Baker's Dozen Doughnuts All week, get 13 doughnuts for the price of 12

*links above are examples only

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk