Ignore:
Timestamp:
2010-10-19T22:20:32+02:00 (14 years ago)
Author:
upliner
Message:

importvec: ignore DTDs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/ImportVectorAction.java

    r23712 r23715  
    88import java.awt.geom.Point2D;
    99import java.awt.geom.Rectangle2D;
     10import java.io.ByteArrayInputStream;
    1011import java.io.File;
    1112import java.io.FileInputStream;
     
    3435import org.openstreetmap.josm.io.OsmTransferException;
    3536import org.openstreetmap.josm.tools.Shortcut;
     37import org.xml.sax.EntityResolver;
    3638import org.xml.sax.InputSource;
    3739import org.xml.sax.SAXException;
     
    203205                    XMLReader rdr = XMLReaderFactory.createXMLReader();
    204206                    rdr.setContentHandler(loader);
     207                    rdr.setEntityResolver(new EntityResolver() {
     208                                public InputSource resolveEntity(String publicId, String systemId) {
     209                                    //Ignore all DTDs
     210                                    return new InputSource(new ByteArrayInputStream(new byte[0]));
     211                                }
     212                            });
    205213                    FileInputStream in = new FileInputStream(f);
    206214                    try {
Note: See TracChangeset for help on using the changeset viewer.