Hi Raman,
According to your question, I think your concern is how to get the attribute of a node in XmlDocument.
You can make use ofXmlDocument class. Like this:
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.Load("the path of the xml document");
string type = doc.FirstChild.Attributes["type"].Value;
Hope this helps.
Raymond,
Thanks for a response. However, my question is more towards being able to access a custom XML attribute for a cascading dropdown using the AJAX Toolkit cascading dropdown examplehttp://ajax.asp.net/ajaxtoolkit/CascadingDropDown/CascadingDropDown.aspx. I was hoping to use not just name and value attributes but be able to specify my own custom attributes and use the in my code behind.
I hope you can get a picture of what I'm trying to do.
Best,
Raman
Raman,
So your intention is to use the existing API QuerySimpleCascadingDropDownDocument on a custom xml document?
Having taken a rough look at its source code, the attribute name is hard coded in the xpath string. So, I think this API can't be applied to a document with custom format.
But you definitely can implement a similar method.
I'll give that a shot. Thanks Raymond.
No comments:
Post a Comment