Comments (1)
Just found this from the lxml mailing list where the person had trouble getting
the line number if it was over 65k... so trouble for big KML's, but it is a
start.
http://permalink.gmane.org/gmane.comp.python.lxml.devel/6085
def validate_xml(xml_filename, xsd_filename):
# real dom config xsd
xsd_fd = open(xsd_filename, 'r')
xmlschema_doc = etree.parse(xsd_fd)
xsd = etree.XMLSchema(xmlschema_doc)
doc = open(xml_filename, 'r').read()
doc_xml = etree.XML(doc)
if xsd.validate(doc_xml):
print "valid"
else:
print "invalid"
print xsd.error_log
Original comment by [email protected]
on 4 Aug 2011 at 3:56
from pykml.
Related Issues (20)
- Add example: placing GeoTiffs
- Add example: gridded summary of vector data
- Add example: realtime updates from a latitude feed
- Add example: integrate with a geocoder api HOT 1
- Add example: display WMS results
- Add method for populating gx:Track
- Add the ability to calculate <Camera> element parameters from a <LookAt> element HOT 1
- Allow validation against a schema on a remote URL
- Look into lxml PyTypes as a way of adding specific KML functionality to lxml elements
- Calculate intermediate camera parameters using splines
- Parsing without schema validatation doesn't preserve CDATA sections HOT 2
- Avoid using setuptools
- Add example of visualizing global carbon emissions time series
- Improve the ability to output CDATA wrapped strings
- Add function for creating overlays of text
- is there a mac OSX version of pykml? HOT 2
- [security] Potential for XXE-type exploits when parsing untrusted documents
- LineString editing of existing KML
- Update tests to use pytest
- Any missing contributions from Google?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pykml.