org.vectomatic.dom.svg.impl
Class SVGParserImpl

java.lang.Object
  extended by org.vectomatic.dom.svg.impl.SVGParserImpl
Direct Known Subclasses:
SVGParserImplIE, SVGParserImplMozilla, SVGParserImplOpera, SVGParserImplWebkit

public class SVGParserImpl
extends Object


Constructor Summary
SVGParserImpl()
           
 
Method Summary
protected static SVGSVGElement enableScriptElements(SVGSVGElement svg)
          Re-enables scripts disabled by the DOMParser.parseFromString method.
 SVGSVGElement parse(String rawSvg, boolean enableScripts)
          Parses the supplied SVG text into a document
 com.google.gwt.dom.client.Document parseFromString(String rawText, String contentType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGParserImpl

public SVGParserImpl()
Method Detail

parseFromString

public final com.google.gwt.dom.client.Document parseFromString(String rawText,
                                                                String contentType)

parse

public SVGSVGElement parse(String rawSvg,
                           boolean enableScripts)
                    throws ParserException
Parses the supplied SVG text into a document

Parameters:
rawSvg - raw xml to be parsed
enableScripts - true to enable embedded scripts, false otherwise
Returns:
the document resulting from the parse
Throws:
ParserException

enableScriptElements

protected static SVGSVGElement enableScriptElements(SVGSVGElement svg)
Re-enables scripts disabled by the DOMParser.parseFromString method.

Parameters:
svg - The svg for which scripts are to be re-enabled.
Returns:
The svg with re-enabled scripts.


Copyright © 2012. All Rights Reserved.