Accessing XML value with PHP
How would you access the value of 'seconds' within this XML code using PHP?
<entry><yt:duration seconds='339'/></entry>
So far I have:
$xml -> entry -> ?!?
For Serty:
<?xml version='1.0' encoding='UTF-8'?&g开发者_如何学Ct;
Well, what you are looking for is called an attribute. If you are using php to parse your xml, then I would look at http://php.net/manual/en/domelement.getattribute.php, and find a comment that helps you.
Without knowing how you are parsing it though, I can't help much more
精彩评论