xsl-list
[Top] [All Lists]

Re: [xsl] Recovering the 'document order' of parsed json

2013-10-29 10:07:01
On 10/29/2013 08:31 AM, Tony Graham wrote:
So would you be better off with a XML representation of the JSON rather
than the JSON as XSLT/XPath datatypes?

Yes, I think you're right. For this particular task, having the JSON
represented as xml will be much more convenient than walking through a map.

There is, e.g., David Lee's "JSON XML Schema (JXML)" at
http://xml.calldei.com/JsonXML, but given his stated conceptual
difficulties with XSLT, he's unlikely to have produced a XSLT library for
parsing JSON into JXML.

I've also found http://www.gerixsoft.com/blog/xslt/json2xml and

I'd tried that one, but it blows up I do "ant test" (also it felt kind
of bulky). Also I though "I should give some of those fancy xslt 3.0
features s shot".

https://dnovatchev.wordpress.com/2007/07/05/transforming-json/ but YMMV
since you may just be wanting elements for the different JSON types as in
JXML rather than turning JSON names into XML element names as in the other
approaches that I've seen.

That looks promising. I'll give it a shot.

Thanks,
David



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>