XmlIndexQueryQuery Method (ConnectionId, SessionId, String, Int32, Int32, Int32, Int32, Int32, String) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Performs a query against the Content Studio Xml index and optionally returns data.

Namespace: ContentStudio.Document.EPT
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public string Query(
	ConnectionId connectionId,
	SessionId sessionId,
	string xmlParameterData,
	int pageNumber,
	int pageSize,
	out int pageCount,
	out int recordCount,
	out int status,
	out string statusText
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
xmlParameterData
Type: SystemString
XML that contains the parameters that this call uses. This XML is according to the Content Studio parameters XML schema
pageNumber
Type: SystemInt32
The page number to read. If this value is less than 1 PageNumber will be 1.
pageSize
Type: SystemInt32
The size of the pages to read. If this parameter is less than 1 PageSize will be 0 which is unlimited.
pageCount
Type: SystemInt32
The total pages of data found
recordCount
Type: SystemInt32
The total entries found
status
Type: SystemInt32
An integer indicating result of the call. Zero is success.
statusText
Type: SystemString
The textual representation of the call result.

Return Value

Type: String
Xml with the following sample syntax.
Xml
<root>
  <status>0</status>
  <statustext>Success</statustext>
  <pageno>1</pageno>
  <pagesize>5</pagesize>
  <pagecount>1</pagecount>
  <recordcount>1</recordcount>
  <rows>
    <row documentid="1242" Introduction="Content Studio 5 " Header="Web Content Management easier that ever!" />
    <!-- more row items can follow -->
  </rows>
</root>
Examples

This sample shows the xml syntax for XMLParameterData. <root> <parameters> <parameter name="CategoryID">123</parameter> <parameter name="Filter">[CS_Document_Title] = 'News'</parameter> <parameter name="AggregateType">SelectDistinctValues</parameter> <parameter name="SortCommand">[CS_PublishDate] ASC</parameter> <parameter name="DraftsOnly">1</parameter> <parameter name="DraftsAndApproved">1</parameter> <parameter name="IgnorePublishStatus">0</parameter> <parameter name="CheckForReadPermission">0</parameter> <parameter name="ReturnExtendedFields">0</parameter> <parameter name="PreviewDate">2009-01-01</parameter> <parameter name="F1">CS_Document_Title</parameter> <parameter name="F2">CS_PublishDate</parameter> <parameter name="R1">1</parameter> <parameter name="R2">0</parameter> <parameter name="DT2">DateTime</parameter> <parameter name="RangeSize">10</parameter> <parameter name="PageNumber">1</parameter> <parameter name="PageSize">20</parameter> </parameters> </root> For an example on how to make an xml query see the the example provided with the overloaded version documentation of this method. Note that the number of attributes in the row element is depending on the number of fields returned.
Content Studio permissions

BROWSE permission on the documents selected is required if DraftsOnly is false otherwise READ permission is required. If permission on meta data is applied on the document category additional permissions on connected documents may apply.
Remarks

The XmlFilter class provides a much more user friendly way of programming against the Content Studio Xml filter.
Remarks

This is the backwards compatible implementation of this method. This implementation does not throw any exceptions, instead callers must examine the outcome of the call in the Status and StatusText output parameters.
See Also

Reference