我正在使用 curl 访问谷歌分析数据。
它的响应文本包含如下内容。
<entry gd:etag='W/"A0EEQX47eSp7I2A9WhZSFU8."' gd:kind='analytics#datarow'>
<id>http://www.google.com/analytics/feeds/data?ids=ga:176&ga:pagePath=/indian-language-unicode-converter/punjabi-unicode-converter.html&start-date=2011-03-01&end-date=2011-03-31</id>
<updated>2011-03-30T17:00:00.001-07:00</updated>
<title>ga:pagePath=/indian-language-unicode-converter/punjabi-unicode-converter.html</title>
<link rel='alternate' type='text/html' href='http://www.google.com/analytics'/>
<dxp:dimension name='ga:pagePath' value='/indian-language-unicode-converter/punjabi-unicode-converter.html'/>
<dxp:metric confidenceInterval='0.0' name='ga:pageviews' type='integer' value='1131'/>
</entry>
<entry gd:etag='W/"A0EEQX47eSp7I2A9WhZSFU8."' gd:kind='analytics#datarow'>
<id>http://www.google.com/analytics/feeds/data?ids=ga:76&ga:pagePath=/indian-language-unicode-converter/hindi-unicode-converter.html&start-date=2011-03-01&end-date=2011-03-31</id>
<updated>2011-03-30T17:00:00.001-07:00</updated>
<title>ga:pagePath=/indian-language-unicode-converter/hindi-unicode-converter.html</title>
<link rel='alternate' type='text/html' href='http://www.google.com/analytics'/>
<dxp:dimension name='ga:pagePath' value='/indian-language-unicode-converter/hindi-unicode-converter.html'/>
<dxp:metric confidenceInterval='0.0' name='ga:pageviews' type='integer' value='974'/>
</entry>
在上面我想访问 <dxp:dimension 和 <dxp:metric
我尝试使用 getglementsbytagname 使用 simplexml 和 phpdomxml,但我仍然无法到达该节点。
如果有人可以帮助我,那就太好了..只是逻辑..
除了 xml dxp:dimension 中的这个符号是什么?