DictionaryToXml

<< Fare clic per visualizzazione il sommario >>

Percorso:  API di piattaforma > Altri servizi > Rest >

DictionaryToXml

Service

Rest

 

Method

DictionaryToXml

 

Description

Converts a dataset to a string containing the equivalent Xml.

 

Input

Name

Description

Type

Optional

dictionary

Dataset to convert.

Dataset

 

dictionaryFieldNames

A list containing the names of the dictionary keys corresponding to the field names specified in the xmlFieldNames list; a null or empty list implies that the keys in the dataset will be used as field names in the returned Xml structure.

List of string

 

xmlFieldNames

A list containing the names of fields (regardless of the level) mapped in the corresponding fields specified in the dictionaryFieldNames list; a null or empty list implies that the dataset keys will be used as field names in the returned Xml structure.

List of string

 

Output

Name

Description

Type

Optional

returnValue

A string containing the dataset data in Xml format.

String

 

 

Remarks

This function can help constructing data for POST or PUT invocations that require Xml format. The dictionaryFieldNames and xmlFieldNames lists must have the same number of elements.

As an example, if dictionaryFieldNames[0] = “xmlInfo”, xmlFieldNames[0] = “?xml”, dictionaryFieldNames[0] = “pageid” and xmlFieldNames[0] = “@pageid”, then the “xmlInfo” field in the dataset will be returned as the “?xml” field in the returned Xml structure and “pageid” as the “@pageid” field; fields not present in the dictionaryFieldNames list will retain their names in the returned Xml structure.