Java Reference
In-Depth Information
import javax.xml.parsers.*;
import org.w3c.dom.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
import javax.xml.transform.dom.*;
import org.xml.sax.*;
import javax.xml.validation.*;
import static java.awt.event.InputEvent.*;
import static java.awt.AWTEvent.*;
import static java.awt.Color.*;
import static Constants.SketcherConstants.*;
import static javax.swing.Action.*;
I have the following set of imports in Element.java :
import java.awt.*;
import java.io.Serializable;
import static Constants.SketcherConstants.*;
import java.awt.geom.*;
import org.w3c.dom.Document;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.NamedNodeMap;
Check your version of the code to make sure you have them all. It's easy to miss one or two!
TRY IT OUT: Sketches in XML
You can try various combinations of elements to see how they look in XML. Make sure that the sketch-
er.dtd file is in the directory that you identified in the code. If you don't, you aren't able to import XML
sketches because the DTD will not be found. Don't forget you can look at the XML using any text editor
and in most browsers. I created the sketch shown in Figure 23-1 .
FIGURE 23-1
 
 
Search WWH ::




Custom Search