Hi Rory,
I agree with Martin that you can first get the value via LINQ expression,
and then use iif expression to check the value.
=========================
Dim xml As XElement = _
<foo><bar
attr1="value1">fdsfdsf<block>dfdsf</block></bar></foo>
Dim str1 As String = xml.<bar>
[email protected]()
Console.WriteLine(IIf(String.IsNullOrEmpty(str1), "default value",
str1))
========================
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------