小编use*_*029的帖子

需要XML路径

我有以下XML文件:

<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book category="COOKING">
  <title lang="en">Everyday Italian</title>
  <author>Giada De Laurentiis</author>
  <year>2005</year>
  <price>30.00</price>
</book>
<book category="CHILDREN">
  <title lang="en">Harry Potter</title>
  <author>J K. Rowling</author>
  <year>2005</year>
  <price>29.99</price>
</book>
<book category="WEB">
  <title lang="en">XQuery Kick Start</title>
  <author>James McGovern</author>
  <author>Per Bothner</author>
  <author>Kurt Cagle</author>
  <author>James Linn</author>
  <author>Vaidyanathan Nagarajan</author>
  <year>2003</year>
  <price>49.99</price>
  </book>
<book category="WEB">
  <title lang="en">Learning XML</title>
  <author>Erik T. Ray</author>
  <year>2003</year>
  <price>39.95</price>
  </book>
</bookstore>
Run Code Online (Sandbox Code Playgroud)

我需要编写一个XML路径来返回2003年之后发布的书,类别是孩子,我只需要显示书的作者和标题?令人沮丧的是,除了我错过了作者之外,我在XPATH中写了所有内容.

xml xpath

2
推荐指数
1
解决办法
259
查看次数

标签 统计

xml ×1

xpath ×1