惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - LiAnGcAt

禁用Ctrl+鼠标滚轮缩放VS代码窗体文字大小 SQLServer2008 收缩日志 Win/Mac 下修复exFAT 分区 “System.AccessViolationException”类型的未经处理的异常在 System.Data.dll 中发生 SQLServer的ERRORLOG太大怎么办 sql查询重复记录 访问 IIS 元数据库失败 关于并发控制的笔记 SQLServer 2005 在VISTA下重新安装并硬恢复数据库后,SA登陆异常 在Vista下配置VS2003 SQL Server的游标 SQL Server 2000 Agent自动关闭? 服务器HTTPS和HTTPS的session SQL 笔记 二 Ctrl + 0!!!怎么就记不住呢 当link button无法提交form 当你的SQLServer没有启动~ SQLServer学习:复制表结构 禁用xp_cmdshell!
笔记,随笔,摘
LiAnGcAt · 2008-09-04 · via 博客园 - LiAnGcAt

<xml>
<mydata>
<a1 name="中国">
<a2 name="北京">
    <a2_1 name="李四"/>
    <a2_1 name="张三"/>
</a2>
   <a2   addree="上海">
<a2_1 name="王二"/>
    <a2_1 name="麻子"/>
   </a2>
</a1>
</mydata>
</xml>

要查找"张三"并返回该节点的语句怎么写?我用的是下面的语句有错误提示啊!!
t_name="张三"
set oNode = xmldoc.selectSingleNode("//a2/a2_1[@" & getAttribute("name") & "=" & t_name & "]")
---------------------------------------------------
错误提示的内容是:
类型不匹配: 'getAttribute'    怎么办啊急等呢
解决办法

selectSingleNode("//a2_1[@name='张三']")

如果"北京"有一个张三,上海也有一个"张三",那么在查询时再加上一个"北京"或者"上海"作为前导条件,又怎么写语句啊?

selectSingleNode("//a2_1[@name='张三' and (parent::node()[@name='北京'])]")