Changeset 4770 in josm
- Timestamp:
- 2012-01-08T15:46:23+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r4656 r4770 37 37 import javax.swing.JOptionPane; 38 38 import javax.swing.UIManager; 39 import javax.xml. parsers.SAXParserFactory;39 import javax.xml.XMLConstants; 40 40 import javax.xml.stream.XMLInputFactory; 41 41 import javax.xml.stream.XMLStreamConstants; 42 42 import javax.xml.stream.XMLStreamException; 43 43 import javax.xml.stream.XMLStreamReader; 44 import javax.xml.transform.stax.StAXSource;45 44 import javax.xml.transform.stream.StreamSource; 46 45 import javax.xml.validation.Schema; … … 1430 1429 1431 1430 public void validateXML(Reader in) throws Exception { 1432 SchemaFactory factory = SchemaFactory.newInstance( "http://www.w3.org/2001/XMLSchema");1431 SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); 1433 1432 Schema schema = factory.newSchema(new StreamSource(new MirroredInputStream("resource://data/preferences.xsd"))); 1434 XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(in);1435 1433 Validator validator = schema.newValidator(); 1436 validator.validate(new St AXSource(parser));1434 validator.validate(new StreamSource(in)); 1437 1435 } 1438 1436
Note:
See TracChangeset
for help on using the changeset viewer.