import PT_INTEGRATION:CIRESTDefinition;
Local PT_INTEGRATION:CIRESTDefinition &oConvert = create PT_INTEGRATION:CIRESTDefinition();
Local string &sJSON, &sXML;
Local XmlDoc &xmlDoc, &retXmlDoc;
&sXML = GetHTMLText(HTML.XPPHTMLX);
&xmlDoc = CreateXmlDoc(&sXML);
&sJSON = &oConvert.convertXMLtoJSON(&xmlDoc);
WinMessage(&sJSON, 64);
REM XPPJSONX - create an HTML object and paste the JSON from above into this HTML so that it can be compared with the original XML;
&retXmlDoc = &oConvert.convertJSONtoXML(GetHTMLText(HTML.XPPJSONX));
WinMessage(&retXmlDoc.GenFormattedXmlString(), 64);