MakeMusic
SmartMusic Finale Garritan MusicXML

creating an SVG file - Help!

Moderator: Michael Good

Re: creating an SVG file - Help!

Postby Brian Grainger » Sat Aug 24, 2002 1:50 pm

Somebody wrote:Or since an SVG document is a DOM document, can it be created the same as any DOM document?

Yes. You should be able to manipulate any valid XML file as a DOM document using standard Java library routines. Have a look at

http://www.webreference.com/xml/column25/

Regards, Brian
Brian Grainger
 
Posts: 111
Joined: March, 2014
Reputation: 0

creating an SVG file - Help!

Postby Jane Singer » Sat Aug 24, 2002 2:24 pm

I too am working with MusicXML and SVG, and am just getting back to it.

Can someone suggest sources for this?

Can someone suggest a place where I can find actual Java code examples of creating SVG files? Most of the example code I find for the JSVGCanvas that I'm using involves creating a canvas directly from a file, without actually creating a DOM object. Since we are reading a MusicXML into a DOM object, I assume I need to create an SVG dom object from scratch.

Or since an SVG document is a DOM document, can it be created the same as any DOM document? I see a lot of classes such as: import org.apache.batik.dom.svg.SVGDOMImplementation;

So I'm assuming I should be using these.

Any hints would be appreciated. Again, any sample code would really speed things along.

Thanks,

Jane
Jane Singer
 
Posts: 27
Joined: March, 2014
Reputation: 0

Re: creating an SVG file - Help!

Postby Jane Singer » Sat Aug 24, 2002 5:13 pm

Thanks Brian. Right, OK, I know how to do that, but the JSVGCanvas will display it if I create it that way?

Jane


Brian Grainger wrote:
Brian Grainger wrote:Or since an SVG document is a DOM document, can it be created the same as any DOM document?

Yes. You should be able to manipulate any valid XML file as a DOM document using standard Java library routines. Have a look at

http://www.webreference.com/xml/column25/

Regards, Brian
Jane Singer
 
Posts: 27
Joined: March, 2014
Reputation: 0

Re: creating an SVG file - Help!

Postby Brian Grainger » Sat Aug 24, 2002 6:17 pm

Jane Singer wrote:Right, OK, I know how to do that, but the JSVGCanvas will display it if I create it that way?

As long as the DOM document you create is valid SVG, I can't see why there would be any problems. There really is no difference in the SVG whether you create it in a text editor, paint it in a graphics program, or build it directly from DOM nodes. Those are just different ways to produce the same result.

Regards, Brian
Brian Grainger
 
Posts: 111
Joined: March, 2014
Reputation: 0

Who is online

Users browsing this forum: No registered users and 2 guests

cron