Hi Prad,

prad <[EMAIL PROTECTED]> wrote on 07/27/2006 03:09:21 AM:

> Am able to parse svg and traverse through dom tree..The problem is when 
an
> non svg element is encountered(like <Segments></Segments> or 
<Planes></Planes>
> its giving exceptions.I dont know how to overcome this problem..plz any 
help
> me...its urgent...

   Batik will not allow you to create elements that are not part
of the SVG specification in the SVG namespace.  So you must move your
elements into a different namespace.

   Here is a short example of how an SVG document might look with
multiple namespaces:

<svg width="450" height="500" viewBox="0 0 450 500"
     xmlns="http://www.w3.org/2000/svg";
     xmlns:xlink="http://www.w3.org/1999/xlink";
     xmlns:prad="http://www.prad.org/geometry";> <!-- your namespace -->

   <!-- An SVG Rect -->
   <rect x="0" y="0" width="450" height="500" fill="grey"/>

   <!-- A Prad Segment (notice prefix on element) -->
   <prad:Segments nPoints="10"/>
</svg>

> org.w3c.dom.DOMException: The current document is unable to create an
> element
> of the requested type (namespace: http://www.w3.org/
> 2000/svg, name: Segments).


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to