XML to array - what are the options?

Keith Clarke keith.clarke at clarkeandclarke.co.uk
Sun May 8 12:00:20 EDT 2011


Jim. 
Thanks for the response. 

Apologies - my question should have been more specific - about concepts, techniques and examples of applying arrays to manipulating XML data, rather than tools.   

Notwithstanding that, it's good to know that Ken's library is the state of the art, as I been using the paid-for v2.1, with its excellent workshop tool (alongside Mark Wider's libSOAP library) to interrogate various web services and gain a basic understanding of XML data files I want to target. 

With these, I now have found some potentially interesting XML data that I want to process. So, I'm trying to learn how I might apply arrays to this data, in the following specific scenarios:

1. Display data, from a specific node in a single XML file, a set number of node layers, in rTree as a 'node outline' or 'flattened' into a data grid.

2. Create a new 'related' data set from two XML files with common nodes. If the source data was in database tables, CSV files or spreadsheets, I'd be in my comfort zone and know what to do. I understand outlines and can see how I could combine XML files manually - and so could probably build-up some text-manipulation scripts from scratch. But there must be a simpler, higher-level, repeatable and more efficient way of doing this.

Any ideas gratefully received.
Best,
Keith.. 
 
On 8 May 2011, at 14:58, Jim Ault wrote:

> On May 8, 2011, at 3:03 AM, Keith Clarke wrote:
> 
>> Hi folks,
>> I need to start learning about how best to convert XML files to arrays.
>> There seems to be quite a lot of content around on this subject, so I'd really appreciate any pointers for where best to start my research.
>> What is the state of the art regarding tools and techniques - and are there any stacks or tutorials that have helped others with this?
> 
> A good start...
> http://www.sonsothunder.com/home/home.htm#xmllib211
> 
> by Ken Ray
> has an XML library that is state of the art.
> I spoke with Ken last week at the conference and he said that his lib was not faster than the Rev XML, but had some better features.
> 
> The few times I did any work with parsing XML boiled down to text chunking rather than using an XML lib.
> 
> 
> Jim Ault
> Las Vegas





More information about the use-livecode mailing list