Using the Beta 2 TreeView

The Beta 2 TreeView control is real nice. I've thrown several XML files at it with various file extensions and the XML data structure is mapped to the tree which is exactly what I need.

As we have learned, a given schema may include child elements with the same name as other child elements neither of which are neccessarily derived from the same parent node. An <image> element comes to mind.

I could use some help understanding how to use the SelectedNodeChanged event to determine which parent a given instance of an <image> element is derived from and how to then send the name of that element as a QueryString value using NavigateUrl.

The SelectedNode.Value.ToString() returns the name but Intellisense does not show any support for other members within the SelectedNodeChanged code block.

There's not much documentation or many articles written yet. Any comments in this context will help me learn something.

[938 byte] By [clintonG] at [2008-1-25]
# 1
You need the new System.Xml.Schema.XmlSchemaValidator that can give you all the XmlSchemaType information for a given document as well as the expected elements from a given point in the document. This is the same object that the Visual Studio XML Text Editor uses for intellisense.
ChrisLovett at 2007-8-21 > top of Msdn Tech,.NET Development,XML and the .NET Framework...
# 2
Chris Lovett wrote:
You need the new System.Xml.Schema.XmlSchemaValidator that can give you all the XmlSchemaType information for a given document as well as the expected elements from a given point in the document. This is the same object that the Visual Studio XML Text Editor uses for intellisense.

Thank you for bringing that to my attention but a brief word about how to use the XmlSchemaValidator to determine which parent a child belongs to when an item in the tree is selected is what I need to learn at the moment.

clintonG at 2007-8-21 > top of Msdn Tech,.NET Development,XML and the .NET Framework...

.NET Development

Site Classified