Please enable JavaScript to view this site.

QPR Knowledge Base 2023.1

  •      
  • Navigation: Developer's Guide > QPR Web Services Foundation > Functions

    QueryObjectsAsXml

    Scroll Prev Top Next More

    Revision history:

    Introduced in QPR 8.0

     

    Performs a query and returns the results as a string containing XML. Apart from the return value type this function behaves similarly as QueryObjects, so please see the sub-sections of that function listing for more information about the functions and attributes available.

     

    Synopsis:

     

    string QueryObjectsAsXml (string sessionId, string query, string criteria, string sortBy, string attributes, string options)

     

    Return Value:

     

    Result set of the query as a string containing XML. If the set contains objects to which the user does not have rights to, only object ID is returned for those.

     

    Parameters:

     

    sessionId: String. ID of an authenticated session.

    query: String. The actual query. See the Query Syntax section for syntax information.

    criteria: String.

    sortBy: String.

    attributes: String. Comma-separated list of attributes that are included in the results.

    options: String. Additional options for the query.

     

    Example Procedure:

     

    ServiceClient client = new ServiceClient("WSHttpBinding_IService");

    string sessionId = client.Authenticate("qpr", "demo");

    string xmlElement = client.QueryObjectsAsXml(sessionId, "[SC.1].SubObjects", "", "", "", "");

    client.LogOff(sessionId);

    client.Close();