-
-
//The first step is to create a parser xml_parser_create(encoding); - $xml = xml_parser_create('utf-8');
- //xml_parser_set_option — parse the specified XML Set options
- //xml_parser_set_option($xml,XML_OPTION_CASE_FOLDING,false); false output as it is
- //Register event, what function will be used to start and end table timing
- xml_set_element_handler($xml,"starttag","endtag") ;
xml_set_character_data_handler($xml,"content");
function starttag($x,$tagName,$args){
- if($tagName= ="USERS")
- echo "
{$tagName}";
- else if($tagName == "USER") {
- echo "
";
- echo "
{$args['ID']} | ";
- }else
- echo "
";
- } p>
function endtag($x,$tagName){
- if($tagName=="USERS")
- echo "
| ";
- else if($tagName = = "USER")
- echo "
|
";