The keyword here is "bidirectional". BD. x2j is still partly procedural.
XSLT is although declarative, still only unidirectional. To achieve true BD, you need a strict 1:1 map, which can be applied either way. One idea is to use a uniform XML represtation of J arrays--UJX, like plists on Mac represent Cocoa structures-- primitive data types, lists and dictionaries. Then to define a BD map, you specify XPath pairs: of arbitrary XML schema and UJX. You will only need to write one time the UJX->J (using x2j) and J->UJX (using XML writer, also from XML/sax addon). Plus a third one-time tool to transform the XML using the BD map. There are many tools that do that, eg http://www.stylusstudio.com/xml_schema_mapper_screenshot.html On Nov 13, 2009, at 11:20 PM, Devon McCormick <devon...@gmail.com> wrote: I've used one of the XML parsers in J and that worked fine for extracting data from an XML file. I guess what I'd really like is to read the XML to extract data - usually simple, tabular data - and retain information about the structure so I could re-build the XML with the tabular data replaced by other data. Right now, I'm dependent on Java programmers to supply me with a CSV to XML converter but they have delivered little beyond buggy, non-working code and promises that they'll get it right "real soon now". Now that I've formulated the spec in the first sentence above, I'm thinking that this would be a good general tool and I should go ahead and do it myself. On Fri, Nov 13, 2009 at 8:35 PM, Oleg Kobchenko <oleg...@yahoo.com> wrote: I believe there's an XML writer in xml/sax addon. Also search for x2j in forums. You need j2x. On Nov 13, 2009, at 12:33 PM, Devon McCormick <devon...@gmail.com> wrote: Does anyone have experience converting .CSV to .XML files? If so, any useful tips to offer? -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm