Re: [xsl] Some things I learned about writing code

Subject: Re: [xsl] Some things I learned about writing code
From: "Chris Papademetrious chrispitude@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 10 Sep 2023 12:04:56 -0000
Hi Martin,

I recently needed to convert JSON to XML for a one-off task, and your
answer here was exactly what I needed:

https://stackoverflow.com/questions/67312950/how-to-convert-json-to-xml-using
-xslt

My initial attempt to use it failed because some of my JSON fields were
numeric instead of strings; you might want to consider updating the code to
handle more field data types, to help future travellers who stumble upon
your code.

It's amazing how many times you have already answered a question that I am
about to ask.

 - Chris




On Sun, Sep 10, 2023 at 7:54b/AM Martin Honnen martin.honnen@xxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>
> Am 10.09.2023 um 13:44 schrieb Roger L Costello costello@xxxxxxxxx:
>
>
>    1.
>    2. There is input data that code consumes and output data that code
>    produces. What is the format of the input data? What is the format of
the
>    output data? I like using a format that has a good query language. That
way
>    I can run queries on the input data to check that I correctly understand
>    the input data and I can run queries on the output data to check that my
>    code generated the correct output data. I really like the XPath query
>    language b it is both simple and powerful. Of course, XPath is only
>    applicable to XML-formatted data, so I like formatting the input and
output
>    data as XML.
>
> XPath 3.1 can also process and query JSON data, see the parse-json and
> json-doc function and the XDM maps and arrays functions and the use of ? as
> a lookup operator on XDM maps and arrays (to which JSON objects and arrays
> are mapped).
>
>
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3519310> (by
> email <>)

Current Thread