Position:Home>net development> About the XML literal of Visual Basic 9.0 quantity and XML later period are boun
About the XML literal of Visual Basic 9.0 quantity and XML later period are boun
From;  Author:Stand originally
Visual Basic 9.0 is XML compositive setting technically group of a development, do one's best combines XML language and Visual Basic language completely, make Visual Basic becomes entire industry to support first-rate to develop a tool to XML. The language of support of XLinq—— new generation that these new character are based on Microsoft is compositive the XML frame of inquiry. Use XLinq can cultivate shape object model to build and be visited according to XML logic. About XLinq we do not think overmuch introduction, the reader that have fun at can consult relevant data, what we should introduce is, VB9 is the breathtaking grammar that XLinq place does.

XML literal is measured

How had you wanted to found XML to you can be achieved in a kind of programming language simple? VB9 supports the original structure of direct XML documentation to regard literal as the quantity, that is to say, can write directly in VB9:

It is to cite below extract:
Dim X = Mordern Operating Systems


So write, VB not just it regards as a string, can help you make the inspection of XML structure however, and compile implement the structure that knows this one XML, because this meeting has the help of intelligent perception. You can measure XML literal cent to be written into much travel, until those who encounter an element is terminative (in example) quantity of literal of ability judgement XML is written, because this need not use add travel symbol. This that is to say, the XML of VB can convey to be the XML construction segment of the root with unit element. If XML literal is measured,be merely such, thought of without much carelessness. We can let this XML literal measure medium data trends to change:

It is to cite below extract:

Dim RootName = "Books "
Dim B As New Book {Author:="A. S. Tanenbaum" , title:="Mordern Operating Systems" , ID:=20}

Dim X = <(rootName)><Book Author=(b.Author)><%= B.Title %></Book></>



We observe the code above, elemental name Books can be appointed with variable, the “ hole ” that should comprise in bracket only is filled can, it is very important to shut mark accordingly to become this, because elemental name has been of dynamic decision, introduce the specific basis that write a law so the position will close corresponding number. We see, the value of Attribute also can be filled with the hole (the name of Attribute also can use identical and syntactic) , but the Inner Text part of mark cannot use a hole, want to use this kind to be similar to ASP.net data to bind decided grammar however, this calls code to embed. This already very powerful and stirring, be? But insufficient still, the grammar that we can include inquiry embeds XML literal is measured in. Assume we have a group of Book to want to generate:

It is to cite below extract:

Dim Books = GetBooks() ' created the rally of Book type with other code suppose
Previous12 Next