Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2010, 01:05 AM
Authorized User
 
Join Date: Jul 2009
Posts: 25
Thanks: 1
Thanked 0 Times in 0 Posts
Default stylesheet for json to xml

Can anyone provide a generic XSLT V1.0 stylesheet for converting JSON to XML

Thanks
 
Old July 12th, 2010, 10:59 AM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 9
Thanked 0 Times in 0 Posts
Default Stylesheet for converting JSON to XML

Eventhough feasible, I wonder what the expert will write / say.

There are a few posts on doing the work the other way around (which looks to me the sensible way to do things).
  1. Converting XML to JSON @ ThomasFrank.se
  2. Converting XML to JSON @ XML.com

To convert JSON to XML through XSLT looks to me a cumbersome approach as XSL deals with XML-valid files, not with text file



\T,
 
Old July 12th, 2010, 11:48 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

I know of an XSLT 2.0 solution, see http://dnovatchev.spaces.live.com/Bl...7488!367.entry
XSLT 1.0 does not look like the right tool to me.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
The Following User Says Thank You to Martin Honnen For This Useful Post:
tsmets (July 12th, 2010)
 
Old April 25th, 2013, 08:37 AM
Registered User
 
Join Date: Apr 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT 1.0 Solution available

Since XSLT 2.0 support is so spotty, I devised a two-step Json-to-XML based on XSLT 1.0 without extensions.

It is published at Tek-Tips XML Forum.





Similar Threads
Thread Thread Starter Forum Replies Last Post
XML or JSON? ajaxbeginner BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 1 December 6th, 2009 07:32 PM
Calling Other xml from stylesheet jlarremore XSLT 1 October 12th, 2005 01:02 PM
2 XML Docs > 1 XSLT Stylesheet kwilliams XSLT 3 September 12th, 2005 11:22 AM
Multiple XML Docs/One XSLT Stylesheet kwilliams XSLT 5 August 4th, 2005 11:54 AM
Create XML Doc with Stylesheet Declaration rodmcleay General .NET 1 November 15th, 2004 04:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.