VB 9.0 Xml Features. Uber Cool or...?
Microsoft XML Team's WebLog : VB 9.0 Xml features - Xml namespaces example
"Bill McCarthy asked me to post Xml axis members example using namespaces. So I updated the sample from my previous post as follows:
I added an imports statement for Xml namespace:
Imports ns = "http://someNamespace"
I also update my xml document to include namespaces:
Dim Person = _
<ns:Person ns:Dept="SQL Server" xmlns:ns="http://someNamespace">
<ns:Name>
</ns:Person>
Finally, I updated the code that uses the new syntax for Xml axis members:
Console.WriteLine(Person.<ns:Name>.Value)
Console.WriteLine(Person.@ns:Dept.Value)
Person.<ns:Name>.Value = "Mike Champion"
Console.WriteLine(Person.<ns:Name>.Value)
… "
I saw this cool VB9/XML stuff at PDC 2005. And I’m just not sure about it…
On one hand I think it’s the coolest stuff since Spagettio's added meat-balls and on the other I have to wonder at how easy it’s going to be to build “quick and dirty” nightmares with it…
Still in the end, I DO want this feature/capability in VB9. “With great power comes…” and all that.
I think a “XML code fragment” browser would help my sanity.
Kind of like the new uber cool Document Outline window in VS2005. A project wide window to easily see, navigate to (and maybe edit?) all these XML fragments embedded in the code. Or maybe a tweak to the Class View window to show these fragments? That would do the trick…
No comments:
Post a Comment