コード例 #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
ファイル: xml_tree.go プロジェクト: paulcadman/golibxml
// xmlFreeProp
func (attr *Attribute) Free() {
	C.xmlFreeProp(attr.Ptr)
	attr.Ptr = nil
}