freshmeat.net http://freshmeat.net/ freshmeat.net maintains the Web''s largest index of Unix and cross-platform open source software. Thousands of applications are meticulously cataloged in the freshmeat.net database, and links to new code are added daily. dc:language>en-usdc:language> dc:subject>Technologydc:subject> dc:publisher>freshmeat.net dc:creator>freshmeat.net contributorsdc:creator> dc:rights>Copyright (c) 1997-2002 OSDNdc:rights> dc:date>2002-02-11T10:20+00:00dc:date> rdf:Seq> rdf:li rdf:resource="http://freshmeat.net/releases/69583/" /> rdf:li rdf:resource="http://freshmeat.net/releases/69581/" />
rdf:about="http://freshmeat.net/releases/69583/"> sloop.splitter 0.2.1 http://freshmeat.net/releases/69583/ A real time sound effects program. dc:date>2002-02-11T04:52-06:00dc:date>
rdf:about="http://freshmeat.net/releases/69581/"> apacompile 1.9.9 http://freshmeat.net/releases/69581/ A full-featured Apache compilation HOWTO. dc:date>2002-02-11T04:52-06:00dc:date>
rdf:RDF>
下面是分析这一文档并显示其中数据的PHP脚本: php // XML file $file = "fm-releases.rdf",
// set up some variables for use by the parser $currentTag = "", $flag = "",
// create parser $xp = xml_parser_create(),
// set element handler xml_set_element_handler($xp, "elementBegin", "elementEnd"), xml_set_character_data_handler($xp, "characterData"), xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, TRUE),
// read XML file if (!($fp = fopen($file, "r"))) { die("Could not read $file"), }
// parse data while ($xml = fread($fp, 4096)) { if (!xml_parse($xp, $xml, feof($fp))) { die("XML parser error: " . xml_error_string(xml_get_error_code($xp))),
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn