Print

Print


have you tried this?

http://www.bramstein.com/projects/xsltjson/
http://github.com/bramstein/xsltjson

using the parameter |use-rayfish=true seems to preserve everything but 
namespaces but then there is a parameter to preserve namespaces as well.|

Mark

On 3/5/2010 12:54 AM, Godmar Back wrote:
> Hi,
>
> Can anybody recommend an open source XML2JSON converter in PhP or
> Python (or potentially other languages, including XSLT stylesheets)?
>
> Ideally, it should implement one of the common JSON conventions, such
> as Google's JSON convention for GData [1], but anything that preserves
> all elements, attributes, and text content of the XML file would be
> acceptable.
>
> Note that json_encode(simplexml_load_file(...)) does not meet this
> requirement - in fact, nothing based on simplexml_load_file() will.
> (It can't even load MarcXML correctly).
>
> Thanks!
>
>   - Godmar
>
> [1] http://code.google.com/apis/gdata/docs/json.html
>