예제 #1
0
파일: node.go 프로젝트: grmartin/go-libxml2
func (n *Element) RemoveAttribute(name string) error {
	prop, err := n.getAttributeNode(name)
	if err != nil {
		return err
	}

	C.xmlUnlinkNode((*C.xmlNode)(unsafe.Pointer(prop)))
	C.xmlFreeProp(prop)

	return nil
}
예제 #2
0
// xmlFreeProp
func (attr *Attribute) Free() {
	C.xmlFreeProp(attr.Ptr)
	attr.Ptr = nil
}