PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/src/wrappers/xml/library/xml2_parser.e

http://github.com/tybor/Liberty
Specman e | 22 lines | 16 code | 2 blank | 4 comment | 1 complexity | 3ed02bc04bc74fb451e7dcdfcc42bbcc MD5 | raw file
 1deferred class XML2_PARSER
 2
 3insert LIBXML2_EXTERNALS
 4feature {ANY} 
 5	parse_file (an_xml_file: STRING): XML2_DOC
 6		-- parse the XML file named `an_xml_file' and build a tree. Automatic
 7		-- support for ZLIB/Compress compressed document is provided by default
 8		-- if found at compile-time. The resulting XML2_DOC will be Void if the
 9		-- file was not wellformed.
10	require name_not_void: an_xml_file/=Void
11	local p: POINTER
12	do
13		debug 
14			print ("Parsing "+an_xml_file+"%N")
15		end
16		p:=xml_parse_file(an_xml_file.to_external)
17		if p.is_not_null then 
18			create Result.from_external_pointer(p)
19		end
20	end 
21end -- class XML2_PARSER
22