我要选择不在Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If (Trim(strSubject)) Like "FOR REVIEW*" Then
Prompt$ = "Please do xyz"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Review Subject Line") = vbNo Then
Cancel = True
End If
End If
End Sub
元素内的所有a
标签。
<div id="not-take-inside">....</div>
我要选择不在<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>
<div><a href="#">TEXT</a></div>
<div><a href="#">TEXT</a></div>
<div><a href="#">TEXT</a></div>
</div>
<div id="not-take-inside">
<ul>
<li><a href="#">TEXT</a></li>
<li><a href="#">TEXT</a></li>
<li><a href="#">TEXT</a></li>
<li><a href="#">TEXT</a></li>
<li><a href="#">TEXT</a></li>
</ul>
</div>
<div>
<div><a href="#">TEXT</a></div>
<div><a href="#">TEXT</a></div>
<div><a href="#">TEXT</a></div>
<div>
<div><a href="#">TEXT</a></div>
<div><a href="#">TEXT</a></div>
<div><a href="#">TEXT</a></div>
</div>
</div>
</body>
</html>
元素内的所有a
标签。
我尝试像<div id="not-take-inside">....</div>
这样的XPATH不起作用。
答案 0 :(得分:2)
您只需要选择所有var item = GetItemFromDb(...);
// mark appropriate DateTime fields manually as needed
item.OrderDate = DateTime.SpecifyKind(item.OrderDate, DateTimeKind.Utc);
// now it will be serialized to "2018-10-17T16:21:23.507Z" with the Z at the end
// and javascript will parse it properly and convert to local timezone as needed
属性节点为a
的{{1}}属性节点ancestor::
:
@id
不需要两个谓词。
答案 1 :(得分:1)
简单使用//a[not(ancestor::*[@id='not-take-inside'])]
:)