用Xquery/XUpdate立即替换xml文档的所有元素
给定以下xml文件:用Xquery/XUpdate立即替换xml文档的所有元素,xquery,xquery-update,Xquery,Xquery Update,给定以下xml文件: <?xml-stylesheet type="text/xsl" href="cars.xsl"?> <garagexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="cars.xsd"><!--Enlazar su XSD--> <car> <color>red</color&g
<?xml-stylesheet type="text/xsl" href="cars.xsl"?>
<garagexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="cars.xsd"><!--Enlazar su XSD-->
<car>
<color>red</color>
<power>120</power>
<seats>5</seats>
<price>33500</price>
</car>
<car>
<color>white</color>
<power>120</power>
<seats>5</seats>
<price>23500</price>
</car>
<car>
<color>blue</color>
<power>200</power>
<seats>5</seats>
<price>45500</price>
</car>
</garage>
谢谢这比预期的容易:
update replace /garage/car/color
with <color>white</color>
另外,Stackoverflow论坛上仍然没有“XUpdate”标签。如果有人添加它就好了。这比预期的要容易:
update replace /garage/car/color
with <color>white</color>
另外,Stackoverflow论坛上仍然没有“XUpdate”标签。如果有人添加它就好了。有一个xquery更新标签。我用它标记了你的问题。有一个xquery更新标记。我在你的问题上加了标签。