Hi Alice,

Alice Cavallo wrote:

I am trying to read and process SVG files from a Java application.
I am trying to use SAX, but there is some characters that are not
understood by SAX.
For example, the only way SaxParser could read properly the SVG file
(without any error and outputing the right information) was after
removing the following comment line :

 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>

This probably indicates that the document doesn't conform to the SVG DTD. Seeing the errors would help confirm this.

Can I really read SVG using SaxParser?

Yes, this is exactly what Batik does.

Any advice?

Either turn of validation or fix your content so it conforms to the DTD.

I do need a generic
method to read any given SVG file and parse the tags and attributes.

You could look at the Batik batik.dom.svg.SAXSVGDocumentFactory

Thank you so much and I hope you all had good holidays (for the
american crew).


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



Reply via email to