How do I load a xml file with PHP? [duplicate]
Possible Duplicate:
Best XML Parser for PHP
I h开发者_如何学Cave an XML code like as given below
<response-code>100</response-code>
<tktname>m1318049ebc11833623372</tktname>
<abc-id>1237829</abc-id>
I want to fetch the tktname from the XMl using PHP
What about http://www.php.net/manual/en/simplexml.examples-basic.php?
$xml = new SimpleXMLElement('<test>'.$yourcode.'</test>');
print $xml->tktname;
You want to use xml_parse to create your own parser: http://www.php.net/manual/de/intro.xml.php. xml_parse is part of php so it's likely to be installed even on shared hoster. Or you want to use DOM-XML a php extension: http://www.php.net/manual/en/book.domxml.php
精彩评论