Re: [jQuery] Serializing XML

2006-10-04 Thread John Resig
> There is Object.toXML(), can be found here: > http://jquery.com/dev/svn/jquery/build/js/xml.js Not really something > special by jQuery, but should do the job. Well, it is sort of specific to jQuery, because I wrote it ;-) With that being said, I wouldn't trust that code any more than I could th

Re: [jQuery] Serializing XML

2006-10-03 Thread Ⓙⓐⓚⓔ
It's nice that we agree on so many levels! ! It's even good when we don't! at least we learn about other opinions! -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░ ▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒ ___

Re: [jQuery] Serializing XML

2006-10-03 Thread Christof Donat
Hi, > I wasn't claiming that for was any less great than each! I was > complaining about looping a concat vs. doing a join at t the end... Erm, did I discuss that somewhere? You answered to my posting. The concat vs. join stuff was Sam. My point was to take the check for XMLSerializer out of th

Re: [jQuery] Serializing XML

2006-10-03 Thread Ⓙⓐⓚⓔ
I wasn't claiming that for was any less great than each! I was complaining about looping a concat vs. doing a join at t the end... and other micro effeciencies. I gave up tiny-tuning code when I gave up assembler. I tell this to all my programmers, You can't compare a little application code time

Re: [jQuery] Serializing XML

2006-10-03 Thread Christof Donat
Hi, > I like optimized code as much as the next guy... but brevity and > readability is KEY. the milliseconds that you can save using one > reasonable technique vs. another are not comparable to the seconds it > takes for an http request. Is this about my suggestion to use for() instead of each(

Re: [jQuery] Serializing XML

2006-10-02 Thread Ⓙⓐⓚⓔ
I like optimized code as much as the next guy... but brevity and readability is KEY. the milliseconds that you can save using one reasonable technique vs. another are not comparable to the seconds it takes for an http request. I never liked using XMLSerializer because I can't hit the tags & attri

Re: [jQuery] Serializing XML

2006-10-02 Thread Christof Donat
Hi, > $.fn.serializeXML = function () { > var out = ''; > if (typeof XMLSerializer == 'function') { > var xs = new XMLSerializer(); > this.each(function() { > out += xs.serializeToString(this); > }); > } else if (thi

Re: [jQuery] Serializing XML

2006-10-02 Thread Sam Collett
On 02/10/06, Mark Gibson <[EMAIL PROTECTED]> wrote: > Ok, after some searching around the web, I believe that > Firefox, Opera, and Safari all implement XMLSerializer, > whilst IE has an 'xml' property on every node. > So here's my XML serializer plugin: > > $.fn.serializeXML = function () { >

Re: [jQuery] Serializing XML

2006-10-02 Thread Brandon Aaron
I can test in Safari and Opera if you'll provide an example/test page. :) -- Brandon Aaron On 10/2/06, Mark Gibson <[EMAIL PROTECTED]> wrote: > Ok, after some searching around the web, I believe that > Firefox, Opera, and Safari all implement XMLSerializer, > whilst IE has an 'xml' property on ev

Re: [jQuery] Serializing XML

2006-10-02 Thread Mark Gibson
Ok, after some searching around the web, I believe that Firefox, Opera, and Safari all implement XMLSerializer, whilst IE has an 'xml' property on every node. So here's my XML serializer plugin: $.fn.serializeXML = function () { var out = ''; if (typeof XMLSerializer == 'function')

Re: [jQuery] Serializing XML

2006-10-02 Thread Mark Gibson
Sam Collett wrote: > On 02/10/06, Mark Gibson <[EMAIL PROTECTED]> wrote: >> Hello, >> I've search high and low, but can't find a method of serializing XML >> with jQuery. Have I missed something, or should I start writing a >> new plugin? ($.fn.serializeXML) >> >> I know that firefox has XMLSeriali

Re: [jQuery] Serializing XML

2006-10-02 Thread Jörn Zaefferer
Mark Gibson schrieb: > Hello, > I've search high and low, but can't find a method of serializing XML > with jQuery. Have I missed something, or should I start writing a > new plugin? ($.fn.serializeXML) > > I know that firefox has XMLSerializer(), any ideas for IE, Safari, > Opera? Maybe just a han

Re: [jQuery] Serializing XML

2006-10-02 Thread Sam Collett
On 02/10/06, Mark Gibson <[EMAIL PROTECTED]> wrote: > Hello, > I've search high and low, but can't find a method of serializing XML > with jQuery. Have I missed something, or should I start writing a > new plugin? ($.fn.serializeXML) > > I know that firefox has XMLSerializer(), any ideas for IE, Sa

[jQuery] Serializing XML

2006-10-02 Thread Mark Gibson
Hello, I've search high and low, but can't find a method of serializing XML with jQuery. Have I missed something, or should I start writing a new plugin? ($.fn.serializeXML) I know that firefox has XMLSerializer(), any ideas for IE, Safari, Opera? Maybe just a hand coded JS serializing routine? -