|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: "XMLSON" Idea.
On 7/26/06, David Lyon <david.lyon@p...> wrote: > On Wed, 2006-07-26 at 12:54 +0200, Tei wrote: > > He!. > > .. > > I have a idea that can be fun. > > > > <?xml?> > > <sales vendor='John'> > > <item id="carrot" price="3" quantity="10"/> > > <item id="papas" price="5" quantity="3"/> > > </sales> > > > > "Magic goes here". > > Javascript: > > > > alert( staticClone.sales.carrot._quantity );// will croack 3 > > > > alert( staticClone.sales._vendor );// will croack John > > lol :-) > > Is that real code or hypothetical? hypothetical :D > > (why mr-google says doesn't know xmlson?) > I made-up the name, of course. > hypotheticalscript: > > // -- Ding when the price falls below 2.25 > alert( staticClone.sales.carrot._price < 2.25); > > Would be much more useful. That is generate an alert when there is > somebody with a carrot price of less than $2.25. I provide the code as a example of the syntax. Its not usefull, as most examples: int main() { printf("hello world"); } Often real world examples are much more complex, so are "bad" examples: #include <sys/cdefs.h> #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\ The Regents of the University of California. All rights reserved.\n"); #endif /* not lint */ #ifndef lint #if 0 static char sccsid[] = "@(#)yes.c 8.1 (Berkeley) 6/6/93"; #endif __RCSID("$NetBSD: yes.c,v 1.8 2006/04/24 05:24:03 jld Exp $"); #endif /* not lint */ #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { const char *yes; yes = (argc > 1) ? argv[1] : "y"; while(puts(yes) >= 0) continue; return EXIT_FAILURE; } --Tei postdata: javascript is scripting and is evaluated, java is programming with strict type checking and is compiled. Wildly different animals.
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||






