We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › how does proxml bring data into processing
Page Index Toggle Pages: 1
how does proxml bring data into processing? (Read 815 times)
how does proxml bring data into processing?
Feb 24th, 2010, 9:38am
 
is it imported as an array?

i have tried to clarify this myself by reading and printing elements (children and attributes) but i can't figure it.
Everything refers to parsing but what does this actually mean?

Thanks.
Re: how does proxml bring data into processing?
Reply #1 - Feb 24th, 2010, 9:50am
 
I think it operates as Sax parsing (to oppose to Dom parsing, among others).
Let's expand on that. Parsing means taking a string, and finding out patterns, components. Parsing CSV data means to find field values (and headers) out of a continuous string. Parsing XML means to find tag names, attributes and their values and text data. Etc.
The Sax way is to read the string (file) linearly, keeping little in memory, emitting events on each milestone: a new tag, a new attribute (and its value), a text area, etc. The Sax parser keep very little context, perhaps just enough to know the nesting level.
The Dom way actually uses a Sax parser, but builds a model in memory, a tree reflecting the nesting of elements, the dependencies (attributes related to a tag), etc.
It uses lot of memory, but allows transformations of the tree, navigation, etc. Web browsers build a Dom tree of the HTML pages.
Re: how does proxml bring data into processing?
Reply #2 - Feb 24th, 2010, 10:38am
 
So its simply a way of importing and sorting data piece by piece:
http://en.wikipedia.org/wiki/Simple_API_for_XML

Not sure i fully get it but important thing is i get it has nothing to do with arrays.

thanks

Page Index Toggle Pages: 1