Re: elementtree and namespace

"Fredrik Lundh" <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
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>



_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.