Mar*_*itt 5 xml xpath xml-namespaces
我正在努力让XPath定义为uniqueappversionid从以下XML 返回值:
<?xml version="1.0" encoding="UTF-8"?>
<manifest package="air.com.vzw.Foo"
android:versionCode="0"
android:versionName="0.0.0"
android:installLocation="auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="FooAIR">
<meta-data android:name="autoOrients" android:value="true" />
<meta-data android:name="fullScreen" android:value="false" />
<meta-data android:name="uniqueappversionid"
android:value="b1e1bfa8-20b4-4724-a9c3-34b79bc50b8d" />
<meta-data android:name="initialcontent" android:value="FooAIR.swf" />
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
更具体地说,我需要android:value从meta-data元素中获取属性的值android:name等于uniqueappversionid.
小智 3
将a前缀绑定到http://schemas.android.com/apk/res/android命名空间:
/manifest
/application
/meta-data[@a:name='uniqueappversionid']
/@a:value
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10137 次 |
| 最近记录: |