[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-05 Thread augur
OK got non-standard attributes. It forces one rule, that all non- standard attributes for an element must follow 'id' and 'label'. This is standardized in setting var z=2, as it skips past the first attributes and finds the remaining. Though this is a lot of code for each level of elements; var

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-03 Thread augur
Slick, and super fast. Makes it so that I do not even want to move onto JSON ;-)... (JK, my engineers are forcing me too) Made some minor mods, these add a little time and still processes over 50K lines in about 6-8 seconds, and 100K right about 10 seconds. Now everything is its own html object

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread augur
OK this is some progress. Still want more abstraction where I can, though this is much improved. I also need to be able to get arrays of attributes abstractly. function parseXml(xml) { $(xml).find('sites').each(function(){ var PARENTarr =

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread augur
This is better. The arrays are much more efficient, and I cut the code by more than half. I know, I know JSON, I will get there, this is teaching me way more though. I still would like to be able to determine my level of nesting abstractly, and also getting out non- standard attributes. function

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread augur
This is better. The arrays are much more efficient, and I cut the code by more than half. I know, I know JSON, I will get there, this is teaching me way more though. I still would like to be able to determine my level of nesting abstractly, and also getting out non- standard attributes. BTW

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread augur
Let's me have multiple children: function parseXml(xml) { $(xml).find('sites').each(function(){ var PARENTarr = jQuery.makeArray($(this).find('element')); $(PARENTarr).each(function(i){ $(div).append(br/+

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread augur
I was headed in this direction I was trying to get to the function (i,parent),function(j,child) I had not quite figured that part out which is obvious. Let's see what this does. Thanks Chad

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread augur
That is really nice. 100K lines really fast no script time outs. I need to get back and study a little more. I was so terribly close, but missed some really basic principles.

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-02-02 Thread augur
OK, so this is much better than a lesson in parsing XML. Showing the errors that I had made in my process, you have also shown sound jQuery which I was having a hard time picking up from the documentation. I tend to learn best by doing and getting feedback. Mike, thank you. I am going to keep this

Re: [jQuery] Some issue with parent child selector with XML and namespaces

2010-01-29 Thread augur
http://groups.google.com/group/jquery-en/browse_thread/thread/9bc8d31e9cef30f2 This sort of deals with the namespace issues. Linear but it beats it. -- View this message in context:

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-29 Thread augur
Small Tweaks, less lines of code. Still no major breaks in breaking the nested model for XML parsing. Things that I am interested in are being able to determine levels of nesting abstractly, being able to determine attributes abstractly, being able to hold results in an Array, build the array, and

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-29 Thread augur
This gets the variables at the top level and gives me the correct count for each level. function parseXml(xml) { $(xml).find('sites').each(function(){ var PARENT = $(this).children($(this).attr('id')); var PARENTcount =

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-29 Thread augur
Now I am treating each order of elements separately as their own objects. This is much faster, if I can figure out how to append the results correctly. function parseXml(xml) { $(xml).find('sites').each(function(){ PARENT = $(this); var

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-29 Thread augur
this treats processes each order of element separately as a variable. If I can append these correctly. I think that this might be a slightly better process. It is at least treating things in a more object oriented manner. $(xml).find('sites').each(function(){ PARENT = $(this);

[jQuery] A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-28 Thread augur
I spent a couple days looking all over the web for how to do this well. I did some picking and choosing of methods, and I came up with this. It works best in Safari, then FireFox, and then Chrome. I have not tested in IE (do I have to?). It runs up to just over 20,000 lines of XML well, over that

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-28 Thread augur
Funny thing is, my lead engineer said the same thing... Mostly this was an experiment to gain a better understanding of DOM outside of HTML. This is about as exciting as a SAX parser when it comes to speed (5sec in safari for 20K lines, slightly longer in FireFox, and noticeably longer in

[jQuery] Re: A different approach to parsing XML, and a little help on processing attributes more efficiently

2010-01-28 Thread augur
Mike, Thanks so much for taking the time for writing this tutorial. I see how this is effective. I attempted to do similar things with the XML however... The Data Objects for JSON are much more simplistic structurally, and a little obtuse for reading visually. As I mentioned this simply is a