Re: [xml] xmlCopyProp



On Fri, Mar 08, 2002 at 04:02:59PM +0100, Uwe Fechner wrote:
Hello Daniel,

the current version of xmlCopyProp (from the cvs) doesn't work.

It crashes, if called with null as target.

(I passed a property without parent and without namespace.
The same, if I called it with a property with parent
and without namespace.)

Could you have a look at it, please?

  Fixed just in time for the release:

import libxml2
doc = libxml2.parseDoc("""<doc foo="bar"/>""")
elem = doc.getRootElement()
attr = elem.hasProp('foo')
target = libxml2.xmlNode(_obj=None)
copy = target.copyProp(attr)
print copy
<xmlAttr (foo) object at 0x80dca98>


  The target.copyProp was as you pointed out crashing before the fix,

   thanks

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]