Javascript and graphics

Hey guys. Is it possible to use javascript to enable a user to do simple drawing of just lines and a particular image on the client side? Can Javascript then be used to create an xml string or file that represents the drawing? This xml file can then be stored on a server, so that the drawing can be retrieved at a later date for display.
If all this possible, how do I do it, and where do I start?

Yes,by using the Canvas API,apparently it doesn’t support serializing,the canvas manipulates vectors and images,videos directly so I guess,u could just save the current image,but if its line,u could push arrays of lines as an xml, and re-read them when parsing the xml.

thanks. I’ll see what I can do.