/src/wrappers/xml/library/xml2_doc.e
Specman e | 51 lines | 40 code | 10 blank | 1 comment | 2 complexity | d07ddd6a13b43f6c95d7c57748c7a9dd MD5 | raw file
1note 2 description: "." 3 copyright: "[ 4 Copyright (C) 2008-2017: Paolo Redaelli 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public License 8 as published by the Free Software Foundation; either version 2.1 of 9 the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA 20 ]" 21 22class XML2_DOC 23 -- Minimal wrapper of xmlDoc type from libxml2. 24 25inherit 26 C_STRUCT redefine free end 27 EIFFEL_OWNED redefine free end 28 29insert 30 LIBXML2_EXTERNALS 31 SHARED_XML2_NODE_CACHE 32 33create {ANY} from_external_pointer 34 35feature {ANY} 36 root: XML2_NODE 37 do 38 Result:=cache.wrapper(xml_doc_get_root_element(handle)) 39 end 40 41feature {} -- Implementation 42 free (p: POINTER) 43 do 44 xml_free (p) 45 end 46 47 struct_size: INTEGER 48 external "C use <libxml/tree.h>" 49 alias "size_of (xmlDoc)" 50 end 51end -- class XML2_DOC