0 Replies Latest reply on Jul 16, 2007 2:17 PM by bike2810

    Reformat XML SOAP Response


      I am creating a CF component that calls a Web service and I would like to reformat the result. I do not have access to the service provider to make changes so I have to make the conversion on the client side.

      The result from the service returns the field definitions for every element then the actual data values follow. Here is an example of the XML sent back from the service only showing two elements.




      I would like to reformat the XML to make the value of the <fieldName> as the element tag then put the actual value inside the tag. Something like this.


      I am not exactly sure what the best method would be to accomplish this, using the XmlNew function or maybe transforming the output with a style sheet (XSLT).

      Any suggestions would be helpful.