XML Contents Component (xmlcontents)

XMLContents is an XML version of the Contents component with different parameters. (For more information see Understanding XML Components)

URL Parameters

Name Value Description
command getchildren | getmore | sync | ispresent | arechildrenpresent | ishidden Command to execute the getchildren and getmore commands and return the children nodes. When sync is specified, a node corresponding to the current document is selected. The ispresent, ishidden, and arechildrenpresent commands can be used to check node states: online (present), hidden, or offline (not present).

Get Children, Get More, and Sync request values parameters

Name Parameter Description
maxnodes number The number of nodes that are returned in one server request.
minnodesleft number The number of nodes necessary to create a More node with the getmore command.
basepathid path string The ID of the base node.
siteshowhits true | false Shows (TRUE) or hides (FALSE) hit counts. If the component shows hit counts, it takes the last query information from the properties.
ref true | false Generates references (breadcrumbs).
site true | false | string Creates a root site node. If FALSE is specified, or if the site parameter is not declared, the site node is not generated. If the site parameter value is blank or TRUE, the site title is used. If another nonblank value (besides TRUE or FALSE) is specified, that value is used for the site title.

Note: The site title must not contain the following symbols:

  • " (quotation marks)
  • ' (apostrophe)
  • < (left angled bracket)
  • > (right angled bracket)
hidezerohits true | false Hides (TRUE) or shows (FALSE) hit counts when the hit count value is zero.

Get Children request value parameters

Name Parameter Description
depth number Sets the number of nesting levels for the child nodes in the request.
mergetoc true | false Determines whether a child node is merged (TRUE) with its parent node or not (FALSE) when the parent node has no content of its own and only one child node.

Get More request value parameters

Note: The getmore command allows you to hide the nodes of the same level as the defined document. This command helps make the TOC more flexible and convenient.

Name Parameter Description
start string The document name to start the getmore command execution.
direction 1 | 2 The direction of the getmore command execution: 1=forward, 2=backward.

Sync request value parameters

Name Parameter Description
syncpath path string Sets a path to the node to expand the table of contents to.
maxsyncsiblings number Specifies the number of nodes before and after a synchronized node for creating More nodes with the getmore command.

Sample Request

http://localhost/NXT/gateway.dll?	
f=xmlcontents&	
command=getchildren&	
basepathid=samp&	
maxnodes=75&	
minnodesleft=10&	
siteshowhits=true
The result of this sample request is the following XML file:

<?xml version="1.0" encoding="UTF-8" ?>
<toc>
<command>getchildren</command>
<basepathid>samp</basepathid>
<nodes>
	<n ct="application/folder" hc="y" id="samp/qf" n="qf" nc="y" t="Country Quick Facts">
		<n ct="application/folder" hc="y" id="samp/qf/africa" n="africa" nc="y" t="Africa"/>
		<n ct="application/folder" hc="y" id="samp/qf/asia" n="asia" nc="y" t="Asia"/>
		<n ct="application/folder" hc="y" id="samp/qf/central america" n="central america" nc="y" t="Central America"/>
		<n ct="application/folder" hc="y" id="samp/qf/eastern europe" n="eastern europe" nc="y" t="Eastern Europe"/>
		<n ct="application/folder" hc="y" id="samp/qf/europe" n="europe" nc="y" t="Europe"/>
		<n ct="application/folder" hc="y" id="samp/qf/middle east" n="middle east" nc="y" t="Middle East"/>
		<n ct="application/folder" hc="y" id="samp/qf/north america" n="north america" nc="y" t="North America"/>
		<n ct="application/folder" hc="y" id="samp/qf/south america" n="south america" nc="y" t="South America"/>
	</n>
	<n ct="application/folder" hc="y" id="samp/sworks" n="sworks" nc="y" t="Shakespeare&apos;s Works">
		<n ct="application/folder" hc="y" id="samp/sworks/tragedies" n="tragedies" nc="y" t="Tragedies"/>
		<n ct="application/folder" hc="y" id="samp/sworks/comedies" n="comedies" nc="y" t="Comedies"/>
	</n>
</nodes>
</toc>