Read XML
//Header ("Content-Type: Text / XML); $ XML =" XML Version = / "1.0 /"?> / N "; $ XML = $ XML."
$ Parser = xml_parser_create (); // build an XML parser xml_parser_set_option ($ parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option ($ parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct ($ parser, $ xml, $ values, $ tags); / / Resolution XML data into an array XML_Parser_Free ($ PARSER); // Print $ VALUES to see, the landlord you know this array and your XML data Contact Foreach ($ VALUES AS $ VAL) {// I have seen the array above, I know that IF is IF ($ VAL ['Tag'] == 'UserName') $ Name = $ VAL ['Value']; if ($ VAL ['tag'] == 'password') $ PWD = $ VAL ['Value'];} echo "
username:". $ name. "
"; // Show Result Echo "Password:". $ PWD;