Hi Sandy.

Really really thanks for the jsfiddle example and also for the
feedback.

Yeah, you are right, this XML 2 Js Object converter is a generical
tool I did focused on two other plugins I'm working on, MooGooMaps and
MooKrpano.

MooGooMaps will read from the result object, and then create instances
and call methods so a map be displayed accordingly.

And with MooKrpano is something similar but will make instances and
call methods so stuff get done without knowing javascript, since this
one would be more usefull for a non-programmer audience.

So yes, my intention from the begining was to keep this converter
generical, then implement it specific to what other plugins were
needing.

MooTools pals, nice to know you liked it, hope this being usefull to
you.

Excuse me for not knowing how to do some things yet like git,github or
jsfiddle, but I'm still learning web developing stuff and there are
many things still new to me, even, I'm still learning MooTools.

Best regards,
Ciul

On 17 ene, 19:43, Sanford Whiteman <[email protected]>
wrote:
> Nice work.
>
> Here's a jsFiddle demo of your class, using an RSS feed as the XML.
>
>    http://jsfiddle.net/sanford/dasYL/3/
>
> Initial feedback:
>
>  There's  no reason to assume an XML response will have 'xml' in the
> path,  so  it  should  not  be appended unconditionally.  I think it's
> quite  safe  to assume that users of your class will know the full URL
> to their data!  (I worked around this by making you append 'xml' after
> the hash, neutralizing it.)
>
> <Marker title="marker title" lat="10" lng="20" html="HTML to display
> inside an InfoWindow" /> -- hmm, you can't reasonably embed HTML in an
> attribute.  You use a CDATA element for embedding X(HT)ML inside XML.
>
>  I'm  not *overwhelmingly* convinced that this class, as generically
> presented,  is useful.  You're converting to a JS object with a fixed,
> XML-document-like format, which means it will only work if you have an
> API  that  knows  how  to  interpret that format.  I doubt most people
> would  adapt  their  classes  to accept such deep and complex objects.
> Better,  perhaps, to allow users to provide a map/template between DOM
> document and JS object notation, so that incoming valid XML (which you
> presumably can't alter) can be transformed into the best-fit JS object
> for the class(es) to which it will be passed.
>
> -- Sandy

Reply via email to