Hey -
I've been looking for this subject already posted and wasn't able to
find it so sorry if I'm reposting...
I'm attempting to validate Google Earth Generated KMLs along with
custom KMLs. I know jedit is out there, but I am attempting to do this
within java in a custom app.
I can validate our custom KMLs, but oddly my problem is validating
Google Earth generated KMLs. For validation I'm using the tried and
true javax.xml library.
SchemaFactory factory = SchemaFactory.newInstance("
http://www.w3.org/
2001/XMLSchema");
Schema schema = factory.newSchema(new URL("
http://code.google.com/apis/
kml/schema/kml22beta.xsd"));
Validator validator = schema.newValidator();
Source source = new StreamSource(inputFile);
validator.validate(source);
Running this produces constant Validation errors regardless of any
Google Earth Generated KML passed in, any Ideas ?