You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Rao, Begur N (ESEA IS&A)" <be...@honeywell.com> on 2009/01/08 18:00:55 UTC

Batik usage question

I am trying to read SVG file using Java and trying to extract all
component information. Though SVG follow an XML standard, I do not see a
proper XML schema in the SVG file. Is it possible to extract information
from SVG file using Batik? If so, can you please send me Java example?
Are there any other methods to extract the information from SVG? 
  
Thanks 
Begur Rao 
Sr. Staff Engineer 
Honeywell, Aerospace. 


Re: Batik usage question

Posted by Helder Magalhães <he...@gmail.com>.
Hi Begur Rao,


> I am trying to read SVG file using Java and trying to extract all component
> information. Though SVG follow an XML standard, I do not see a proper XML
> schema in the SVG file. Is it possible to extract information from SVG file
> using Batik?

I'm not sure if I understand the "component information" context here.
Do you mean browsing through the XML and/or DOM tree and retrieving
elements/properties? Please provide more details if you seek for more
valuable feedback.


> If so, can you please send me Java example? Are there any other
> methods to extract the information from SVG?

Without further research, the following methods occur to me:
 * Using Java to [1] navigate through the document and/or extract information;
 * Using ECMAScript [2] do do more or less the same - this has the
advantage to run on other SVG implementations but the disadvantage of
a lot less power (mostly due to security impositions) for accessing
local resources, allowing persistence, etc.;
 * Using XSLT (or similar technology) to transform the SVG document
into another format (for example, XML, text, PDF, HTML, etc.). For
this, you may also want to take a look at Apache FOP [3].


Hope this helps,

 Helder Magalhães


[1] http://xmlgraphics.apache.org/batik/using/scripting/java.html
[2] http://xmlgraphics.apache.org/batik/using/scripting/ecmascript.html
[3] http://xmlgraphics.apache.org/fop/

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org