gxlpQuery — query an XML document

Description

This service allows a caller to obtain the XML characteristics of a document. The XML characteristics are either the default values, the values contained in an XML declaration or a combination of both.

Performance Implications

There are no performance implications.

Syntax

int gxlpQuery (void * work_area,
              long work_area_length,
              void * input_buffer,
              long input_buffer_length,
              GXLHQXD ** return_data,
              int * rc_p,
              int * rsn_p);

Parameters

work_area
Supplied parameter
Type:
void *

The name of a work area. The work area must be aligned on a doubleword boundary. If not on a doubleword boundary, results are unpredictable. See the Usage notes for additional details on the use of this area.

work_area_length
Supplied parameter
Type:
long

The name of an area containing the length of the work area. The minimum length of this area is declared as a constant GXLHXEC_MIN_QXDWORK_SIZE in header file gxlhxec.h . This service validates the length of this area against this minimum length value.

input_buffer
Supplied parameter
Type:
void *

The name of an input buffer containing the beginning of the XML document to process. See the Usage notes for details.

input_buffer_length
Supplied parameter
Type:
long

The name of an area containing the length of the input buffer.

return_data
Returned parameter
Type:
GXLHQXD **

The pointer to where the service will return the address of the data which describes the XML document characteristics. This return information will contain values that are either extracted from the XML declaration or defaulted according to the XML standard. This return area is mapped by the header file gxlhqxd.h (see gxlhqxd.h (GXLYQXD) - mapping of the output from the query XML declaration service), and is located within the work area specified by the work_area parameter. The caller must not free the work_area until it is done referencing the data returned from this service.

rc_p
Returned parameter
Type:
int *

The name of the area where the service stores the return code.

rsn_p
Returned parameter
Type:
int *

The name of the area where the service stores the reason code. The reason code is only relevant if the return code is not XRC_SUCCESS.

All parameters in the parameter list are required.

Return and Reason Codes:

On return from a call to this service, register 15 will contain the return code. The return and reason code are both set as output parameters. The value of the reason code is undefined when the return code has no associated reasons. Return and reason codes are defined in header file gxlhxr.h (see gxlhxr.h (GXLYXR) - defines the return codes and reason codes). For reason code descriptions, also see Reason codes listed by value.

Example

void * work_area;
long work_area_length = XEC_MEM_QIMA_SIZE;
void * input_buffer;
long input_buffer_length;
GXLHQXD * return_data;
int rc, rsn;
gxlpQuery(work_area, work_area_length, input_buffer, 
          input_buffer_length, &return_data, &rc, &rsn	);

Usage notes

This callable service is a direct map to GXL1QXD (GXL4QXD). Refer to Usage notes of GXL1QXD (GXL4QXD) for usage information.