易截截图软件、单文件、免安装、纯绿色、仅160KB

删除xml没有值的节点

我要删除 没有值的节点  <price/> 

DECLARE @myDoc xml     
SET @myDoc = ' <root>     
    <item ID="1">
        <title>aaa </title>
        <author>bbb </author>
        <price>10 </price>
    </item> 
    <item ID="2">
        <title>hhh </title>
        <author>hkkk </author>
      <price/>   
    </item>     
</root>' 
SELECT @myDoc

我要的结果是

DECLARE @myDoc xml     
SET @myDoc = ' <root>     
    <item ID="1">
        <title>aaa </title>
        <author>bbb </author>
        <price>10 </price>
    </item> 
    <item ID="2">
        <title>hhh </title>
        <author>hkkk </author> 
    &


相关问答:

数据表生成特定格式的xml - .NET技术 / ASP.NET

从数据库中查询一张表的数据
select 部门,姓名 from tb
如何才能生成下面的xml格式文件
<folder state="unchecked" label="全部">
  <folder state="unchecked" isBra ......

在这样一个xml文件里如何选择特点节点

<?xml version="1.0" encoding="UTF-8" ?> 
<root> 
<video> 
  <device deviceid="\\?\usb#vid_0c45&pid_613b#5&2d0620de& ......

关于Struts2的xml输入校验 - Java / Java EE

在action中至少有4个方法,每个方法接受一种请求,例如四个方法最简单的就是增删改查,每一种操作,需要校验的action属性是不同的,校验属性的规则也是不同的,怎么样才能使用xml的输入校验?
如果是使用actionName ......

XML 存储函数

在Sqlserver数据库Northwinds中创建一个存储过程,
该存储过程有两个参数,nvarchar(5)类型的@customerID 是customers表的customerID, xml类型的参数@xmlCustOrder是输出参数,存储过程将根据orders和customers 表 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号