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
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...