[XML-SIG] elementtree and namespace

Fredrik Lundh fredrik at pythonware.com
Mon Dec 19 17:12:11 CET 2005


Werner F. Bruhin wrote:

> How can I define in a doc the following namespace?
>
> <nsw:wine xmlns:nsw="http://www.winexml.org/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.winexml.org/XMLSchema wineXML.xsd">
> </nsw:wine>
>
> And what do I need to do that subsequent "Element" and "SubElement"
> additions use the name space?  Would I have to name the elements
> "nsw:name" instead of just "name"?

ElementTree uses universal names for this purpose:

    http://effbot.org/zone/element.htm#xml-namespaces

</F>





More information about the XML-SIG mailing list