http://www.w3schools.com/php/func_xml_parse.asp
a więc:
<?php $parser=xml_parser_create(); function char($parser,$data) { } xml_set_character_data_handler($parser,"char"); { xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); } xml_parser_free($parser); ?>
<?xml version="1.0" encoding="UTF-8"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
i teraz chcę parsować tylko część tego pliku xml powiedzmy 100 znaków, regulacja 2 parametrem fread nic tu nie daje