单项选择题
<stuList>
<student id="a001">
<name>jack<name>
<age>22</age>
</student>
<student id="a002">
<name>make<name>
<age>23</age>
</student>
</stuList>
查找id=’a002’的xpath表达式是()。
A.//name[.=’a002’]
B.//name[@id]/age=’22’
C.//name[@id=’a002’]
D.stuList/child::*[2]
相关考题
-
单项选择题
<roster><student ID="s101">;<name>;李华<;/name>;<sex>;男<;/sex>;<birthday>;1978.9.12<;/birthday>;<score>;92<;/score>;</student>;<student ID="s102">;<name>;齐辉<;/name>;<sex>;女<;/sex>;<birthday>;1979.3.2<;/birthday>;<score>;90<;/score>;</student>;</roster>;针对上述XML代码,输出ID为s102的学生的姓名的XSL片段正确的是()。
A.<xsl:template match="/roster"><xsl:value-of select=".[@ID=’s102’]/name"/></xsl:template>
B.<xsl:template match="/roster"><xsl:value-of select="student[@ID=’s102’]/name"/></xsl:template>
C.<xsl:template match="/roster"><xsl:value-of select="[student@ID=’s102’]/name"/></xsl:template>
D.<xsl:template match="/"><xsl:value-of select="student[@ID=’s102’]/name"/></xsl:template> -
单项选择题
<customer_summaryxmlns:addr="http://www.xyz.com/addresses/"xmlns:books="http://www.zyx.com/books/"><addr:name><title>Mrs.</title></addr:name><books:title>Lord of the Rings</books:title>上述是一段关于XML命名空间的实例片段,以下说法错误的是()。
A.本例中,命名空间的前缀分别是addr、books
B.第一个< title>元素属于addr 名称空间,因为其父元素< addr:Name>属于该名称空间
C.名称空间中定义的字符串必须是可以访问的URL,比如:XML 解析器会到http://www.zyx.com/books/去搜索DTD 或schema
D.名称空间的缩写需要在定义之后才能使用 -
多项选择题
<?xml version="1.0"?><!DOCTYPE mydoc[<!ENTITY location "jianwai street">]><customer><name>jack</name><address>&location;</address></customer>关于上述Xml文档,以下描述正确的是()。
A.该Xml文档中使用了外部DTD
B.通过浏览器打开上述Xml文档时,字符串jianwai street代替了&location
C.该Xml文档不是有效的XML文档
D.该Xml文档中的location为参数实体
