1

Is it possible to translate JSON to XML using existing XSLT templates?

I do not want to have another layer of xml transformation JSON->XML->XSLT->Final XML.
Reason being that I am writing a new UI for a legacy system replacing it FlexUI. Current UI sends xml requests and gets xml response.
I am emphasizing on JSON objects so that I can take advantage latest MVVM frameworks like AngularJS or Backbone.js.

I am using XSLT 2.0

Himanshu Yadav
  • 13,315
  • 46
  • 162
  • 291

1 Answers1

1

XSLT on the client can do it via JavaScript libraries:

  • json2xml.js + SAXON CE
  • json2xml.js + Stapling

XSLT on the server can do it via XSLT 2.0 libraries:

  • FXSL 2.0

Or you can do it on the client by reading the JSON file via:

  • an external entity defined in the DTD
  • an external parameter defined in the XSLT processor initialization

then parsing it using string methods.

References

Community
  • 1
  • 1
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265