Ulrich Schaefer
Fri, 05 Mar 2010 01:02:45 -0800
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
Hi, try this: http://code.google.com/p/xml2json-xslt/ best, Ulrich -- Dr.-Ing. Ulrich Schaefer http://dfki.de/~uschaefer phone:+496813025154 DFKI Language Technology Lab, D-66123 Saarbruecken, Germany ------------------------------------------------------------------- Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender), Dr. Walter Olthoff. Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes. Amtsgericht Kaiserslautern, HRB 2313