Re: Support for integration with XML is broken

Ivan Herman writes:

> Except if the has AttributeNS function is not available...

I'm confused -- miniDom has this function, in stock Python 2.6 and
2.7, which is what I thought you said you were using?

  Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)
  [GCC 4.3.4 20090804 (release) 1] on cygwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> from xml.dom.minidom import parseString
  >>> d=parseString("<r xmlns:x='http://www.w3.org/1999/xhtml'
  x:about='#foo'/>")
  >>> d.firstChild.getAttributeNode('x:about').namespaceURI
  u'http://www.w3.org/1999/xhtml'
  >>> d.firstChild.hasAttributeNS('http://www.w3.org/1999/xhtml','about')
  True

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

Received on Friday, 21 October 2011 11:08:08 UTC