mithu_sree Posted January 6, 2007 Share Posted January 6, 2007 [code]<?php function parse_xml_file(){ global $xml_file, $vals, $index; $xml_parser = xml_parser_create(); if (!($fp = fopen($xml_file, "r"))) { die("could not open XML input"); } $data = fread($fp, filesize($xml_file)); fclose($fp); $xml_parser = xml_parser_create(); xml_parse_into_struct($xml_parser, $data, $vals, $index); xml_parser_free($xml_parser);}?>[/code]the inpur xml file contains<?xml ..?><tagA> <t1> ... </t1> <t2> .... </t2></tagA><tagB> <t3>.... </t3></tagB>And The parser stoped after </tagA> What shoud I do to entair tags get parsed? Link to comment https://forums.phpfreaks.com/topic/33057-xml-parser/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.