[Tutor] Question on DOMImplementation Objects
Chris Babcock
cbabcock at asciiking.com
Wed Oct 1 06:40:31 CEST 2008
Does the DOMImplementation interface support schemas?
I'm tweaking an example from a book to process a flat file registration
database:
from xml.dom import implementation
class RegistrationParser:
def parseFile(self, fileAsString):
# Create DocType Declaration
doctype = implementation.createDocumentType('registrations', '',
'archive.xsd')
# Create empty DOM Document and get root element
doc = implementation.createDocument('', 'registrations', doctype)
elemDoc = doc.documentElement
. . .
If I leave archive.xsd out of createDocumentType will it just generate
an XML document without validation?
Chris
--
Make a difference in the world and support more Diplomacy projects and
services then you can shake a dagger at, please read:
http://members.bluegoosenews.com/diplomacy/blog/2008/09/24/a_special_note_for_diplomacy_players
- or -
http://tinyurl.com/3wx6lb
Blue Goose is willing to give me $250 to support various services and
projects in the Diplomacy hobby. The blog post above will tell you why
they are doing this, what I will do with the money, and what you can do
to help me get it.
More information about the Tutor
mailing list