This project is read-only.

mdo:node-set ( xml, [preiod], [post-parameters], )

mdo:node-set accept XML in any form and returns navigable XML DOM object that can be queried using XPath
  • xml. An object that describes XML source somehow. The following types are accepted:
    • URL. You can use http URL to download XML data
    • Relative URL. If URL started with "~" it will be treated as local URL and converted to a physical path inside DNN Host
    • XML string. XML in plane string format.
    • Result tree fragment. XML built inside xsl:variable, xsl:param, xsl:with-param etc.
    • Json string
    • Query string
  • period. This feature is used for URL source only. If specified, XML is put into ASP.NET cache for specified number of seconds. So subsequent requests will not download data but take cached XML instead. This is useful for server-side RSS processing.
  • post-parameters. You can setup an XML structure or url-encoded string that will bw POSTed to URL in case you setup xml=URL.

Listing 1. Posting form to a url via XML variable

<xsl:variable name="values">
  <some>some value</some>
  <another>another value</another>

<xsl:variable name="res" select="mdo:node-set('', 0, $values)"/>

Listing 2. Sending XML as request body

<xsl:variable name="values">
  <mdo:post-xml encoding="1251">
      <some>some value</some>
      <another>another value</another>

<xsl:variable name="res" select="mdo:node-set('', 0, $values)"/>
If XsltDb sees mdo:post-xml node at the top level of post-parameters value it sends inner XML to the remote URL as request body and uses content type text/xml. You may optionaly setup request encoding in encoding attribute. You may use
  • code page (integer number, such as 1251, etc)
  • encoding name (string like utf-8, etc)
Default encoding is utf-8

Last edited Jul 5, 2011 at 8:14 PM by findy, version 11


No comments yet.