sMergeGroups2 (server-side)

Use this routine to merge two sets of XML records containing different information about the same entities, returning the result as an XML string.

One set of records, known as the master set, contains higher-level information about each entity represented in the set. The other set of records, known as the detail set, contains more detailed information about the same set of entities. Both sets of records are contained in XML documents.

The records from each set are matched up and merged into a resulting set of records containing two tiers. The first tier contains the higher-level information, and the second tier contains the detailed information.

Definition

sMergeGroups2(xmlMaster,

              xmlDetail,

              sKeyId)

Parameters

xmlMaster

An XML DOMDocument object containing a set of record elements and associated data elements in the standard XML data record structure. These record elements contain the data that appears in the first tier of the resulting standard XML data record structure, and are considered to contain higher-level information.

xmlDetail

An XML DOMDocument object containing a set of record elements and associated data elements in the standard XML data record format. These record elements contain the data that appears in the second tier of the resulting standard XML data record structure, and are considered to contain more detailed information.

sKeyId

A string that corresponds to the name of a data element that exists in both of the XML documents passed as the other parameters. The values for this element are used to match up records from one XML document with the records in the other.

Return Value

A string that contains the merged, two-tiered set of records, represented in the standard XML data record format.

Remarks

This routine is useful for preparing a two-tiered XML data record structure for use by a two-level ListSheet HTC. For more information about how the ListSheet HTC expects its data in one-, two-, and three-tiered data record structures, see ListSheet and Standard XML Data Record Format.

For more information about how single-tiered XML data record structures are merged to created two- and three-tiered XML data record structures, see XML Data Merging.

This routine is available in the include file ASPUtil.asp.

There is a functionally equivalent version of this routine defined for client-side use in the file ActionPageUtil.asp.

See Also

Server-Side Routines

sMergeGroups3 (server-side)

xmlMergeGroups2 (server-side)

xmlMergeGroups3 (server-side)

Client-Side Routines

sMergeGroups2 (client-side)


All rights reserved.