Show
Ignore:
Timestamp:
06/17/09 10:43:15 (3 years ago)
Author:
jon
Message:

Parsing the schema file

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • collective.imstransport/branches/mini_to_ele/collective/imstransport/utilities/imscc/ccreader.py

    r241 r295  
    1 from elementtree import ElementTree 
     1from lxml import etree as ElementTree 
    22from collective.imstransport.IMS_exceptions import ManifestError 
    33from configcc import LOM_namespace, LOM_IMSCC_namespace, WL_namespace, IMSCP_namespace 
     
    88    def parseManifest(self, manifest): 
    99        """ parse the manifest """ 
     10        import urllib 
     11        urlscraper = urllib.urlopen(IMSCP_namespace + '.xsd') 
     12        schema_imscp = urlscraper.read() 
     13        schema_root = ElementTree.XML(schema_imscp) 
     14        schema = ElementTree.XMLSchema(schema_root) 
     15        parser = ElementTree.XMLParser(schema = schema) 
    1016        return ElementTree.XML(manifest) 
    1117