Did I find the right examples for you? yes no

All Samples(9)  |  Call(6)  |  Derive(0)  |  Import(3)
lxml cannot parse XML files starting with a BOM
(see http://www.w3.org/TR/2000/REC-xml-20001006 in F.1.)
In case such XML file is used, we must skip these characters
So we open all XML files for read with 'xmlFile'.
TODO: File this issue to lxml ML or tracker (feature or bug ?)

        def xmlFile(path, mode='r'):
    """lxml cannot parse XML files starting with a BOM
    (see http://www.w3.org/TR/2000/REC-xml-20001006 in F.1.)
    In case such XML file is used, we must skip these characters
    So we open all XML files for read with 'xmlFile'.
    TODO: File this issue to lxml ML or tracker (feature or bug ?)
    """
    fh = file(path, mode)
    while fh.read(1) != '<': # Ignoring everything before '
    


src/s/p/spiderfoot-HEAD/ext/openxmllib/document.py   spiderfoot(Download)
import contenttypes
from namespaces import ns_map
from utils import xmlFile
from utils import toUnicode
 
        # Getting the content types decl
        ct_file = op_join(self._cache_dir, '[Content_Types].xml')
        self.content_types = contenttypes.ContentTypes(xmlFile(ct_file, 'rb'))
 
 

src/c/y/cyn.in-HEAD/products/OpenXml/openxmllib/document.py   cyn.in(Download)
import contenttypes
from namespaces import ns_map
from utils import xmlFile
from utils import toUnicode
 
        # Getting the content types decl
        ct_file = op_join(self._cache_dir, '[Content_Types].xml')
        self.content_types = contenttypes.ContentTypes(xmlFile(ct_file, 'rb'))
        return
 

src/o/p/openxmllib-1.0.7/openxmllib/document.py   openxmllib(Download)
import contenttypes
from namespaces import ns_map
from utils import xmlFile
from utils import toUnicode
 
        # Getting the content types decl
        ct_file = op_join(self._cache_dir, '[Content_Types].xml')
        self.content_types = contenttypes.ContentTypes(xmlFile(ct_file, 'rb'))
 
 

src/s/p/spiderfoot-HEAD/ext/openxmllib/contenttypes.py   spiderfoot(Download)
                rel_path = rel_path[1:]
            file_path = os.path.join(document._cache_dir, rel_path)
            yield etree.parse(utils.xmlFile(file_path, 'rb'))
        return
 

src/c/y/cyn.in-HEAD/products/OpenXml/openxmllib/contenttypes.py   cyn.in(Download)
                rel_path = rel_path[1:]
            file_path = os.path.join(document._cache_dir, rel_path)
            yield etree.parse(utils.xmlFile(file_path, 'rb'))
        return
 

src/o/p/openxmllib-1.0.7/openxmllib/contenttypes.py   openxmllib(Download)
                rel_path = rel_path[1:]
            file_path = os.path.join(document._cache_dir, rel_path)
            yield etree.parse(utils.xmlFile(file_path, 'rb'))
        return