sqlserver 读取xml 字符串方法
declare @xml xml
declare @propertyName varchar(50)
declare @str nvarchar(max)
set @propertyName = 's_Code'
set @xml = '<root> <row propertyName="s_Code">test</row><row propertyName="s_Posword">admin</row></root>'
SELECT @str =@xml.value('(/root/row[@propertyName=sql:variable("@propertyName")])[1]', 'nvarchar(max)')
select @str
declare @xml xml
declare @propertyName varchar(50)
declare @str nvarchar(max)
set @propertyName = 's_Posword'
set @xml = '<root> <row propertyName="s_Code">test</row><row propertyName="s_Posword">admin</row></root>'
SELECT @str =@xml.value('(/root/row[@propertyName=sql:variable("@propertyName")])[1]', 'nvarchar(max)')
select @str
sqlserver 读取xml 字符串方法的更多相关文章
- java解析xml字符串方法
一,用DOM4J 针对无重复标签的xml字符串格式,如下: 针对此种情况可用DOM4J解析法,引入 dom4j的相关jar包代码如下: Document document=DocumentHelpe ...
- Java获取路径方法&相对路径读取xml文件方法
(1).request.getRealPath("/");//不推荐使用获取工程的根路径 (2).request.getRealPath(request.getRequestURI ...
- javascript读取xml的方法【转载】
jquery读取xml文件 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http ...
- Java笔记之Scanner先读取一个数字,在读取一行字符串方法分析
问题:大家在学习Java读取数据的时候一般都是使用Scanner方法读取数据,但是其中有一个小问题大家可能不知道, 就是我们在使用scanner的时候如果你先读取一个数字,在读取一行带有空格的字符串, ...
- asp.net写入读取xml的方法
添加命名空间 using System.Xml; 我自己的代码(添加其中的节点) XmlDocument xmlDoc = new XmlDocument();xmlDoc.Load(Server.M ...
- sax xpath读取xml字符串
public static void main(String[] args) throws ParserConfigurationException, SAXException, IOExceptio ...
- dom4j处理xml文件,读取xml字符串,格式化xml文件
1.xml文件 <?xml version="1.0" encoding="UTF-8"?> <employees> <emplo ...
- 最简单的JAVA解析XML字符串方法
引入 dom4j 包<dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifa ...
- 读取XML字符串到临时表
DECLARE @hdoc int DECLARE @doc xml SET @doc = '<CityValueSet> <CityItem> <CityId>2 ...
随机推荐
- hdu 5876 (补图BFS) Sparse Graph
题目:这里 题意: 相当于一开始给一个初始好了的无向完全图给你,然后给让你删除m条边,再给你一个点v,最后问你在剩下的图里从这个点v出发能到达所有边点的最小路径是多少? 一看是所有点的最小路径,一看就 ...
- 【Docker 在 windows 10 / windows 8 下安装】
步骤: 1. 下载: a.https://github.com/boot2docker/windows-installer/releases 下载一个 windows 客户端: 安装时建议勾选:Boo ...
- Web页面报错: Eval()、XPath() 和 Bind() 这类数据绑定方法只能在上下文中使用
可以使用string.formt来避免出错. 如: <%# Convert.ToInt32(DataBinder.Eval(Container.DataItem, "Status&qu ...
- [php-src]Php扩展的多文件编译
内容均以php5.6.14为例. 假设有模块 foo,php_foo.h 和 foo.c 是固有文件,额外的C文件如果要加入编译,大致有五步. 1. 新增头文件 foo_bar.h #ifndef F ...
- cassandra指定数据库路径
参考 https://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html 我们 ...
- javascript语言精粹摘要
JavaScript中五种基本类型:string,number,boolean,null,undefined.还有一个对象类型object. javascript只有一个数字类型.它在内部被表示为64 ...
- ubuntu如何傻瓜式安装eric6
最近在搞PyQt5,听闻eric6是一个不错的IDE,但就是配置起来略蛋疼. 在网上搜到不少教程,都是要先编译安装Qt5, PyQt5, sip, qscintilla2, qscintilla2又分 ...
- 使用dom4j创建和解析xml文件
使用dom4j创建和解析xml文件 在项目开发中,我们经常会遇到xml文件的创建和解析从别人接口得到的xml文件,而我们最常使用的组件是dom4j. 下面我就以代码来讲解一下如何使用dom4j来创建x ...
- 图层的核心动画(CABaseAnimation)续
Main.storyboard ViewController.m // // ViewController.m // 8A01.核心动画 // // Created by huan on 16/ ...
- 算法入门笔记------------Day1
1.C语言使用%d显示float值,不会把float值转换为近似的int值,而是显示垃圾值,使用%f显示int值,也不会把该int值转换为浮点值 2.三位数反转:输入一个三位数,分离它的百位,十位和个 ...