Home Search

DriveWorks Pro 22
SppXmlToJson

Send Feedback

SppXmlToJson

Converts an XML string to JSON.

Syntax

SppXmlToJson(XML Data)

Where:

XML Data XML Data as text.

Example

Rule

SppXmlToJson("<people><person department=""Systems""><firstName>Jake</firstName></person><person department=""Sales""><firstName>Phil</firstName></person></people>")

Converts the given XML Data into JSON.

Result

{
	"people": {
		"person": [
			{
				"@department": "Systems",
				"firstName": "Jake"
			},
			{
				"@department": "Sales",
				"firstName": "Phil"
			}
		]
	}
}

See Also