Many people asked us why did we choose the triple dot syntax for the descendants axis in the VB 9.0 Xml members syntax. Before I go into the reasoning for that choice here is a small example of the triple dot syntax. In the following sample, the variable "authors" pointes to all the "author" elements that are descendents of the "book" element:
Dim book = <book year="2000">
<title>Data on the Web</title>
<authors>
<author>Serge Abiteboul</author>
<author>Peter Buneman</author>
<author>Dan Suciu</author>
</authors>
</book>
Dim authors = book...<author>
This statement is compiled to the following statement using the XLinq API:
Dim authors = book.Descendants("author")
We got many suggestions for alternative syntax, the most popular suggestion was to use double dot based on the logic that a single dot maps to XPath single slash thus the double dot should map to double slashes. Another suggestion was to use slashes after the dot or to add them to the element name. Another one was to use a different notation inside the angle brackets such as “*” or just empty tag, for example book.<*>.<author>.
The following are the reasons that this syntax was chosen by the Cω language designers (the incubation work that led to the Xml features in VB 9.0) and the reasons we are keeping it:
Please continue to let us know what you think, your feedback is very important to us.
Avner