Python generate XML with Schema-Locaion -


has idea how can create such xml:

<urlset xsi:schemalocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">     <url>         <loc>http://...</loc>     </url> </urlset> 

how can add xsi:schemalocation xml.etree? here's code:

urlset = et.element("urlset") url in self.urls:     url = et.subelement(urlset, "url")     et.subelement(url, "loc").text = url.loc self.tree = et.elementtree(urlset) self.tree.write(path) 

is there simple way add such attribute? thank you!!


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -